Skip to main content

Module time

Module time 

Source
Expand description

Time conversion helpers for CLI command responses.

Timestamps are stored in postgres as BIGINT unix-seconds, but the CLI surfaces them to callers as RFC3339 strings. These helpers do that conversion at the response boundary. The format (chrono::to_rfc3339, numeric +00:00 offset — not a bare Z) matches what db::query emits for TIMESTAMPTZ columns, so every CLI-emitted timestamp is byte-uniform.

Functions§

unix_to_rfc3339
Render unix-seconds as an RFC3339 string.
unix_to_rfc3339_opt
Option counterpart of unix_to_rfc3339None stays None.