Expand description
FIT timestamp conversions.
FIT stores absolute time as a u32 count of seconds since
1989-12-31 00:00:00 UTC — 631,065,600 seconds after the Unix epoch.
The chrono-based helpers (fit_to_datetime / datetime_to_fit) are
only compiled when the chrono feature is enabled.
Constants§
- FIT_
EPOCH_ OFFSET_ SECS - Seconds between Unix epoch (
1970-01-01) and FIT epoch (1989-12-31).
Functions§
- datetime_
to_ fit - Inverse of
fit_to_datetime. ReturnsNoneif the datetime is before the FIT epoch or beyondu32::MAXseconds after it (≈ year 2125). - fit_
to_ datetime - Convert a FIT timestamp (seconds since FIT epoch) into a UTC datetime.