Skip to main content

Module time

Module time 

Source
Expand description

Time helpers shared by the producer builder and search-params formatter.

ACDP timestamps in publish requests are part of the JCS-canonicalized body (RFC-ACDP-0001 §5.3). Producers MUST emit canonical millisecond precision so the resulting content_hash is reproducible across implementations. chrono::DateTime<Utc> defaults to nanosecond precision; this module centralizes the truncation and the canonical string format used everywhere on the producer path.

Functions§

fmt_rfc3339_ms
Format as the canonical RFC 3339 string with explicit Z suffix and millisecond precision, e.g. 2026-04-16T10:30:15.123Z.
trunc_ms
Truncate to millisecond precision per RFC-ACDP-0001 §5.3.