# llGetRegionTimeOfDay

*LSL function*

```lsl
float float llGetRegionTimeOfDay();
```

- Returns: `float`
- Energy: 10

Will return the same result as [llGetTimeOfDay](/functions/llGetTimeOfDay/) on parcels that use region environment settings.

By default (without custom environment settings), Second Life day cycles are 4 hours long, but can be configured to anywhere between 4 and 168 hours long.

Returns a [float](https://wiki.secondlife.com/wiki/float) that is the time in seconds with sub-second precision since Second Life midnight (per the region-scoped day cycle settings).

```lsl title="How to use" frame="terminal"
float result = llGetRegionTimeOfDay();
```

## Examples

<details open>
<summary>Example 1</summary>

```lsl
default
{
    touch_start(integer total_number)
    {
        float tod = llGetRegionTimeOfDay( );
        llOwnerSay("Time since midnight on current region:");
        integer hours = ((integer)tod / 3600) ;
        integer minutes = ((integer)tod / 60) - (hours * 60);
        llOwnerSay((string) tod + " seconds which is "+(string) hours+"h "+(string) minutes+"m");
    }
}
```

</details>

## See also

### Functions

- [llGetSunDirection](/functions/llGetSunDirection/)
- [llGetTimeOfDay](/functions/llGetTimeOfDay/)

---

*Source: [LlGetRegionTimeOfDay](https://wiki.secondlife.com/wiki/LlGetRegionTimeOfDay) on the Second Life Wiki. Content from the Second Life Wiki article LlGetRegionTimeOfDay (revision 1218958, 2026-07-23), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llGetRegionTimeOfDay/
