readUnixSeconds
readUnixSeconds(
source):number
Unix seconds at the tick, the wall clock’s time as the room stamped it.
The same value for every system in the tick, on the room, on the
player’s page predicting it, on the player’s page’s re-run of it after
a correction, and in a replay of it, so a crop grows and a market opens
alike on every end. A system or a hook reads readUnixSeconds(step),
the stamp of step.tick. A view, a save’s read or restore, or a
message handler reads readUnixSeconds(world), the stamp of the tick a
step of that world runs now, else of the tick it steps next. One tick
of resolution, and never back within a world’s life: the room follows
its wall clock forward where it jumps, as after a suspend, and waits
for it where it steps back. A day is Math.floor(readUnixSeconds(step) / 86_400), in UTC. As Godot’s Time.get_unix_time_from_system() and
Roblox’s workspace:GetServerTimeNow(), but an input of the tick:
Date.now() in a system reads a different time on every end.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
source |
TickSource |
Returns
Section titled “Returns”number