Difference between revisions of "LlGetUnixTime/test"
Jump to navigation
Jump to search
Rob Linden (talk | contribs) |
Rob Linden (talk | contribs) |
||
Line 7: | Line 7: | ||
|lindensig=(none) | |lindensig=(none) | ||
|lindensigner=(none) | |lindensigner=(none) | ||
|text= | |text= | ||
default | default | ||
{ | { | ||
touch_start(integer total_number) | touch_start(integer total_number) | ||
{ | { | ||
Line 20: | Line 20: | ||
llOwnerSay("This object was touched at " + llGetDate() + " " + time + ". Unix time = " + (string)ut); | llOwnerSay("This object was touched at " + llGetDate() + " " + time + ". Unix time = " + (string)ut); | ||
} | } | ||
} | } | ||
|instructions= | |instructions= | ||
# Put this script on an object in world | # Put this script on an object in world |
Revision as of 22:27, 7 February 2007
Purpose
Scripts to test the conformance of the LSL llGetUnixTime function.
Scripts
llGetUnixTime test #1
Status: draft
Introduction
First test, copied from the Second Life KB
Script text
default
{ touch_start(integer total_number) { string time; float ft = llGetGMTclock(); integer ut = llGetUnixTime(); integer hours = llFloor(ft / 3600); integer minutes = llFloor((ft - (hours*3600)) / 60.0); time = (string)hours+ ":" + (string)minutes + ":" + (string)(llFloor(ft) % 60); llOwnerSay("This object was touched at " + llGetDate() + " " + time + ". Unix time = " + (string)ut); } }
Authorized Signature: (none) by (none)
Instructions
- Put this script on an object in world
- Touch the object
- Copy the number after 'Unix time ='
- Paste the number into the Timestamp box on http://www.4webhelp.net/us/timestamp.php
- Press 'Convert to a date'
- Verify the date shown near the top of the web page matches the date and time said by the box
- Repeat 2 - 6 a few times