User:Vegas Silverweb/How to get the SL Time in Chatlog Format
< User:Vegas Silverweb
Jump to navigation
Jump to search
Revision as of 20:31, 20 April 2010 by Vegas Silverweb (talk | contribs) (Created page with 'There's some pretty terrible LSL implementations out there for getting the 24 hour time as reported by Second Life. There's no reason to use a list or conditionals. This one's Go...')
There's some pretty terrible LSL implementations out there for getting the 24 hour time as reported by Second Life. There's no reason to use a list or conditionals. This one's Good.
<lsl> string vsGetSLClock() {
integer time = (integer) llGetWallclock(); integer hours = time / 3600; integer minutes = (time / 60) % 60 ; return llGetSubString("0"+(string)hours,-2,-1)+":"+ llGetSubString("0"+(string)minutes,-2,-1); }
</lsl>