Module offset
The time zone, which calculates offsets from the local time to UTC.
There are four operations provided by the TimeZone trait:
- Converting the local
NaiveDateTimetoDateTime<Tz> - Converting the UTC
NaiveDateTimetoDateTime<Tz> - Converting
DateTime<Tz>to the localNaiveDateTime - Constructing
DateTime<Tz>objects from various offsets
1 is used for constructors. 2 is used for the with_timezone method of date and time types.
3 is used for other methods, e.g. year() or format(), and provided by an associated type
which implements Offset (which then passed to TimeZone for actual implementations).
Technically speaking TimeZone has a total knowledge about given timescale,
but Offset is used as a cache to avoid the repeated conversion
and provides implementations for 1 and 3.
An TimeZone instance can be reconstructed from the corresponding Offset instance.
Enums
-
LocalResult
Old name of
MappedLocalTime. See that type for more documentation.
Traits
Type Aliases
- MappedLocalTime The result of mapping a local time to a concrete instant in a given time zone.