OsGetPSTWallclock

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Change See Also)
 
(8 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
|delay=0
 
|delay=0
 
|function_syntax=float osGetPSTWallclock()
 
|function_syntax=float osGetPSTWallclock()
|ossl_example=
+
|description=returns the current PST or PDT time in seconds since midnight
<source lang = "lsl">
+
|ossl_example=<source lang = "lsl">
// Example of osGetPSTWallclock
+
//
 +
// osGetPSTWallclock Script Example
 +
// Author: djphil
 +
//
 +
 
 
default
 
default
 
{
 
{
 
     state_entry()
 
     state_entry()
 
     {
 
     {
         llSay(0, "started at at " + (string)osGetPSTWallclock());
+
         llSay(PUBLIC_CHANNEL, "Touch to hear osGetPSTWallclock running.");
 +
    }
 +
 
 +
    touch_start(integer number)
 +
    {
 +
        llSay(PUBLIC_CHANNEL, "Clicked at " + (string)osGetPSTWallclock());
 
     }
 
     }
 
}
 
}
 
</source>
 
</source>
|description=returns the current PST or PDT time in seconds since midnight
+
|additional_info=This is replacement for llGetWallclock for those who need PST/PDT time, since llGetWallClock() returns the region  machine local time. Note also that this functions do return a fractional part. Use llRound() to get integer seconds
|additional_info=This is replacement for llGetWallclock for those who need PST/PDT time, since llGetWallClock() returns the region  machine local time
+
added 2019, April 8
 
}}
 
}}
 +
== See Also ==
 +
* [[osGetPSTWallclock]]
 +
* [[osUnixTimeToTimestamp]]

Latest revision as of 19:15, 5 December 2020

float osGetPSTWallclock()
returns the current PST or PDT time in seconds since midnight
Threat Level No threat level specified
Permissions No permissions specified
Extra Delay 0 seconds
Example(s)
//
// osGetPSTWallclock Script Example
// Author: djphil
//
 
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Touch to hear osGetPSTWallclock running.");
    }
 
    touch_start(integer number)
    {
        llSay(PUBLIC_CHANNEL, "Clicked at " + (string)osGetPSTWallclock());
    }
}
Notes
This is replacement for llGetWallclock for those who need PST/PDT time, since llGetWallClock() returns the region machine local time. Note also that this functions do return a fractional part. Use llRound() to get integer seconds

added 2019, April 8


[edit] See Also

Personal tools
General
About This Wiki