Skip to main content

Module epoch

Module epoch 

Source
Expand description

Wall-clock constants: Matter-epoch conversion, the cert NotAfter = no-expiration sentinel, and the firmware build-time seed emitted by build.rs.

Every rs-matter consumer that needs calendar time (cert path validation, the TimeSync cluster’s mandatory UTCTime / Granularity / TimeSource / SetUTCTime, the NOC attestation timestamp, …) reads / writes the Last-Known-Good UTC Time on the crate::Matter object via [crate::Matter::last_known_utc_time] / [crate::Matter::utc_time] / [crate::Matter::set_utc_time]. That value is persisted (per Matter Core spec), seeded from FIRMWARE_BUILD_MATTER_US on a freshly-flashed device, and is the single source of truth — application code that has access to a real-time clock or NTP samples should feed those into [crate::Matter::set_utc_time] directly.

Constants§

FIRMWARE_BUILD_MATTER_US
Firmware build time as Matter-epoch microseconds, captured by build.rs. Seed value for the Last-Known-Good UTC Time on a freshly-flashed device per Matter Core spec §3.5.6.1.
MATTER_CERT_DOESNT_EXPIRE
Matter-epoch value used in cert NotAfter fields to mean “no expiration” — corresponds to the X.509 99991231235959Z generalized-time sentinel translated to Matter-epoch seconds.
MATTER_EPOCH_SECS
Seconds between the UNIX epoch (1970-01-01T00:00:00Z UTC) and the Matter epoch (2000-01-01T00:00:00Z UTC). Add this constant to a Matter-epoch value to get a UNIX-epoch value, or subtract it from a UNIX-epoch value to get a Matter-epoch value.