Stamp2UnixInt
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials | User-Defined Functions | Void's User Page |
User-Defined Function: integer uStamp2UnixInt( list vLstStp' );
Returns an integer that is the Unix time code represented by the input list
- vLstStmp: source time stamp list of format [Y, M, D, h, m, s]
Unsafe Version
(Missing day/month or bad values not handled)
- LSO: 465 bytes
- MONO: 1024 bytes
<lsl>integer uStamp2UnixInt( list vLstStp ){
integer vIntYear = llList2Integer( vLstStp, 0 ) - 1902; integer vIntRtn;if (vIntYear >> 31
Caveats
- Time codes before the year 1902 or past the end of 2037 are capped to the first second of 1902 and 2038 respectively
Notes
- Input list elements past the first six are ignored
- Input format is compattible with: <lsl>llParseString2List( llGetTimestamp(), ["-", "T", ":", "."], [] )</lsl>and<lsl>llParseString2List( llGetDate(), ["-"], [] )</lsl>