Skip to main content

Module time

Module time 

Source
Expand description

RFC 3339 timestamps without a date-time dependency. Wall-clock timestamps without a date-time dependency.

The runtime reads time through a Clock wherever a decision depends on it. These helpers are for the other case: stamping a record (a session, a trace, a stored artifact) with when it was written.

Functionsยง

format_rfc3339
time as RFC 3339 in UTC, to the second (2024-02-29T12:34:56Z).
format_rfc3339_millis
time as RFC 3339 in UTC, to the millisecond (2024-02-29T12:34:56.789Z).
now_rfc3339
The current time as RFC 3339 in UTC, to the second: 2024-02-29T12:34:56Z.
now_rfc3339_millis
The current time as RFC 3339 in UTC, to the millisecond: 2024-02-29T12:34:56.789Z.