Skip to main content

Module clock

Module clock 

Source
Expand description

Local time, with the offset that says which local.

The ledger is one dataset read from two places. The CLI printed 13:40:32 from UTC arithmetic while the portal printed 19:00:18 from the browser’s clock, and neither said which zone it meant, so correlating a portal event with a ledger row was off by the offset and nothing on either screen admitted it. Both now print local time and both name the offset.

The offset comes from the operating system, because that is the only thing that knows it: a zone is a political fact with a history, not a formula. There is no new dependency for it — libc is already in the tree for the Unix side, and the Windows side is one documented call.

Functions§

local_clock
19:00:18 +05:30 — the same clock, without the date, for a dense table.
local_stamp
2026-09-17 19:00:18 +05:30 — one timestamp, saying which clock it is on.
local_when
A row’s time for a dense table: the clock alone for a row from today, the date as well for anything older. semlith ledger printed the clock alone for rows of any age, so a row from last week read as this morning.
offset_at
Seconds east of UTC at the instant at, by this machine’s zone rules.
utc_offset_secs
Seconds east of UTC, right now, as this machine reckons it.
utc_rfc3339
2026-10-01T09:14:03Z: unix seconds as RFC 3339 in UTC, the form the cloud’s API takes.