pub struct UTC;Expand description
Coordinated Universal Time.
Leap-second-aware civil scale. Time<UTC> stores a continuous instant;
leap-second interpretation is computed on demand from the UTC-TAI
segment table. Raw-axis arithmetic acts on that stored instant.
§Storage invariant
Time<UTC> and Time<TAI> store the same continuous instant for
the same physical event. Scale conversion between them is therefore a
numeric no-op at the storage layer.
UTC participates in CoordinateScale, so Time<UTC> exposes the
same raw J2000/JD/MJD instant-axis helpers and second-based arithmetic
as the other built-in scales. Those operations act on the stored
continuous instant, not on a leap-second-labelled civil clock.
UTC still does not implement ContinuousScale. Generic code that
wants a scale with no civil semantics should keep using that stricter
bound; generic code that merely needs a raw coordinate axis can use
CoordinateScale.
§Authoritative UTC API
Use the civil layer for any operation that depends on the UTC-TAI offset (i.e., leap seconds):
crate::Time::<UTC>::from_chrono/crate::Time::try_from_chrono/crate::Time::try_to_chrono- Unix time:
time.try_to::<crate::Unix>()returns acrate::UnixTime