Skip to content
lsl.devlsl.devLSL Dev

Read clocks, dates, timestamps, and script timers.

Feature: Time

What do you want to do?

Reference

14 topic entries

  • string llGetDate()function

    Returns a string representing the current date in the UTC time zone in the format 'YYYY-MM-DD'.

  • integer llGetDayLength()function

    Returns an integer representing the number of seconds in the environmental day cycle applied to the current parcel.

  • integer llGetDayOffset()function

    Returns an integer representing the offset duration (in seconds) added to calculate the current environmental time on this parcel.

  • float llGetGMTclock()function

    Returns a float representing the time in seconds since midnight GMT (truncated to whole seconds).

  • integer llGetRegionDayLength()function

    Returns an integer representing the total number of seconds in the region-wide day cycle.

  • integer llGetRegionDayOffset()function

    Returns an integer representing the offset duration (in seconds) added to calculate the current environmental time for the region.

  • float llGetRegionTimeOfDay()function

    Returns a float with subsecond precision representing the elapsed seconds since region environmental midnight or region uptime (whichever is smaller). If the region's sun position is fixed, returns region uptime.

  • float llGetTimeOfDay()function

    Returns a float with subsecond precision representing the elapsed seconds since parcel environmental midnight or region uptime (whichever is smaller). If the parcel's sun position is fixed, returns region uptime.

  • string llGetTimestamp()function

    Returns a string containing the current date and time in the UTC time zone formatted as an ISO 8601 timestamp ('YYYY-MM-DDThh:mm:ss.ff..fZ').

  • integer llGetUnixTime()function

    Returns an integer representing the current Unix timestamp (the number of seconds elapsed since 00:00:00 Jan 1, 1970 UTC).

  • float llGetWallclock()function

    Returns a float representing the time in seconds since midnight Pacific Time (PST/PDT), which is equivalent to Second Life Time (SLT) truncated to whole seconds.

  • llSetTimerEvent(float sec)function

    Sets a timer to trigger a timer event periodically every sec seconds. Passing 0.0 stops further timer events.

  • llSleep(float sec)function

    Puts the script to sleep for sec seconds (at least until the next server-frame, ~0.02222 seconds). The script is inactive during this time. If sec is 0.0 or less, the script does not sleep.

  • timer()event

    Triggered at regular periodic intervals configured by llSetTimerEvent.