Skip to main content

Module dates

Module dates 

Source
Expand description

Date conversion and formatting helpers for Messages timestamps.

Most dates are stored as nanosecond-precision unix timestamps with an epoch of 1/1/2001 00:00:00 in UTC.

Constants§

MESSAGES_EPOCH_UNIX_SECS
Unix seconds at the Messages epoch, 2001-01-01 00:00:00 UTC.
TIMESTAMP_FACTOR
Factor used to convert nanosecond-precision timestamps to seconds.

Functions§

format
Format a timestamp for export output in the wall-clock time of its zone.
readable_diff
Format the elapsed time between two timestamps.
to_utc
Decode a raw Messages timestamp to an instant.