Skip to main content

Crate zdump_rs

Crate zdump_rs 

Source
Expand description

zdump-rs — a bounded, independent Rust TZif witness companion to zic-rs.

zic-rs is the compiler (tzdb source → TZif). zdump-rs is the inspection companion: it reads TZif and renders what it means (offset / is_dst / abbreviation) at explicit instants, as deterministic JSON witness rows, so the evidence court has an independent second reader to cross-check against reference zdump.

§Scope

Phase 1 (T23.zdump-witness.1):

  • read TZif v1/v2/v3/v4 (independent reader; no shared code with zic-rs)
  • evaluate offset/is_dst/abbreviation at explicit UTC instants
  • emit deterministic JSON witness rows

Phase 2 (T23.zdump-witness.2):

  • interpret the POSIX footer so instants beyond the last explicit transition are projected (offset/is_dst/abbreviation), matching reference zdump far-future — posix module
  • transition listing over a year window (the zdump -v analog) — Tzif::transitions_in
  • expose the leap-second table in the listing

§Explicit NON-claims (guarded as hard as the capability)

  • NOT a full zdump replacement · NOT exact stdout/stderr parity · NOT all flags
  • NOT locale behaviour · NOT a replacement oracle (reference zdump stays the oracle)
  • NOT civil-time truth
  • does NOT apply leap-second corrections to the displayed wall time for right/ zones (the per-type offset/is_dst/abbreviation are reported correctly; the TAI-scale wall rendering near leaps is a tracked Phase-3 refinement)

Re-exports§

pub use tzif::parse;
pub use tzif::Observation;
pub use tzif::TransitionRow;
pub use tzif::Tzif;
pub use witness::WitnessRow;

Modules§

civil
Proleptic-Gregorian civil-time arithmetic, dependency-free.
posix
POSIX TZ-string parsing + evaluation — the TZif footer, used to project offset/is_dst/abbreviation for instants beyond the last explicit transition (Phase 2).
tzif
An independent, bounds-checked TZif reader (RFC 9636).
witness
Deterministic JSON witness rows — the evidence surface this tool exists to produce.

Constants§

PROBE_DEFAULT
The fixed, declared probe-instant set (--probe-default): pre-epoch, the 32-bit time_t floor/ceiling, a few civil years around the admitted 2026b release, and a far-future (footer-governed) point. Shared by the CLI and the golden test so they cannot drift.