LlGetUnixTime: Difference between revisions
Jump to navigation
Jump to search
Kaluura Boa (talk | contribs) mNo edit summary |
spacing |
||
| Line 1: | Line 1: | ||
{{Issues/SVC-6357}}{{ | {{Issues/SVC-6357}}{{LSL Function | ||
|func_id=316|func_sleep=0.0|func_energy=10.0 | |func_id=316|func_sleep=0.0|func_energy=10.0 | ||
|sort=GetUnixTime|func=llGetUnixTime|return_type=integer | |sort=GetUnixTime|func=llGetUnixTime|return_type=integer | ||
|func_footnote | |func_footnote | ||
|func_desc | |func_desc | ||
|return_text=that is the number of seconds elapsed since 00:00 hours, Jan 1, 1970 {{Wikipedia| | |return_text=that is the number of seconds elapsed since 00:00 hours, Jan 1, 1970 {{Wikipedia|Coordinated Universal Time|UTC}} from the system clock. | ||
|spec | |spec | ||
|caveats=*{{Wikipedia| | |caveats=*{{Wikipedia|Year 2038 problem}} | ||
|constants | |constants | ||
|examples=<lsl> | |examples=<lsl> | ||
Revision as of 12:37, 17 February 2012
| LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: integer llGetUnixTime( );| 0.0 | Forced Delay |
| 10.0 | Energy |
Returns an integer that is the number of seconds elapsed since 00:00 hours, Jan 1, 1970
UTC from the system clock.
Caveats
Examples
<lsl> // Reset tracker integer BOOT_TIME; default {
state_entry()
{
BOOT_TIME = llGetUnixTime();
llSetTimerEvent(0.1);
}
timer()
{
llSetText((string)(llGetUnixTime() - BOOT_TIME) + " Seconds since boot.\n\n ", <1,0,0>, 1.0);
llSetTimerEvent(1);
}
}
</lsl>Useful Snippets
Helper Functions
- Unix2StampLst - Converts Unix Time stamp to a list. ex: 1234567890 to [2009, 2, 13, 23, 31, 30]
- Stamp2UnixInt - Converts date to Unix Time stamp. ex: [2009, 2, 13, 23, 31, 30] to 1234567890
- uuLinuxTime - Converts date to Unix Time stamp (from Linux kernel's sources)
- Unix2WeekdayStr - Gets the weekday from a Unix Time stamp. ex: "Friday" from 1234567890
See Also
Functions
| • | llGetTimestamp | – | Human Readable UTC Date and time | |
| • | llGetDate | – | Human Readable UTC Date | |
| • | llGetTime | – | Elapsed script-time. |