OsUnixTimeToTimestamp

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m
Line 1: Line 1:
'''Function Syntax:''' osUnixTimeToTimestamp(integer epoch);<br>
+
{|  width="100%" style="border: thin solid black"
'''Returns:''' string<br>
+
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
'''Threat Level:''' VeryLow
+
|- valign="top"
 +
|'''Threat Level''' || VeryLow
  
This function allows an input unix time to be converted to an llGetTimeStamp() format. Please note that there will be no second fractions. This is because the implementation works with seconds only.
+
|- valign="top"
 
+
|'''Function Syntax''' || <source lang="lsl">
 
+
osUnixTimeToTimestamp(integer epoch);
Example:<br>
+
</source>
 
+
|- valign="top"
<source lang="lsl">
+
|'''Example(s)||<source lang="lsl">
 
// prints something similar to this:
 
// prints something similar to this:
 
// [01:08] Primitive: 2010-11-13T09:08:53.6472090Z
 
// [01:08] Primitive: 2010-11-13T09:08:53.6472090Z
Line 22: Line 23:
 
</source>
 
</source>
  
 +
|}
 +
 +
This function allows an input Unix time to be converted to an llGetTimeStamp() format. Please note that there will be no second fractions. This is because the implementation works with seconds only.
  
[[Category:OSSL]]
+
[[Category:OSSL Functions]]
[[Category:Scripting]]
+

Revision as of 11:40, 11 June 2011

OsUnixTimeToTimestamp
Threat Level VeryLow
Function Syntax
osUnixTimeToTimestamp(integer epoch);
Example(s)
// prints something similar to this:
// [01:08] Primitive: 2010-11-13T09:08:53.6472090Z
// [01:08] Primitive: 2010-11-13T09:08:53.0000000Z
default
{
    state_entry()
    {
        llOwnerSay(llGetTimestamp());
        llOwnerSay(osUnixTimeToTimestamp((integer)llGetUnixTime()));
    }
}

This function allows an input Unix time to be converted to an llGetTimeStamp() format. Please note that there will be no second fractions. This is because the implementation works with seconds only.

Personal tools
General
About This Wiki