In my garden i put a digital sundial invented and designed by Mojoptix at http://www.thingiverse.com/thing:1068443
It is not scripted in anyway. It works by the secondlife sun casting shadows through many very complex holes designed by Mojoptix. I did not set it for sale since I worry about rules. But it does look like he allows any use, even commercial use, as long as you give him credit. The free stl files are meant for 3d printing and using with the real world sun. But Blender converts them to dae fine and its shadows work in secondlife too. Although the time is wrong by about an hour to sl time. My garden if anyone wants to see working, is at
http://maps.secondlife.com/secondlife/Miffen Shade/76/37/21