Expand description
Shared time helpers: the epoch-millisecond clock and the hand-rolled Gregorian calendar conversions used for ISO 8601 wire timestamps. Kept in the kernel (the dependency floor) so every crate shares one implementation instead of a date-library dependency or a per-crate copy.
Functions§
- iso8601
- Format
millissince the Unix epoch asYYYY-MM-DDTHH:MM:SSZ(UTC, no fractional seconds) — RFC 3339 / ISO 8601. - millis_
from_ iso8601 - Parse an ISO 8601 timestamp back to epoch milliseconds. Accepts the
fixed-width
YYYY-MM-DDTHH:MM:SSZformiso8601emits, a fractional…:SS.fffZform (only the leading three fraction digits are kept), and a±HH:MMzone offset in place of theZ. ReturnsNoneunless the shape is adate T timesplit with in-range fields; the fraction is scanned withchars()so untrusted multibyte input never panics. - now_
millis - The current wall-clock time in milliseconds since the Unix epoch, or
0if the clock is before the epoch (unreachable on a sane system).