The time zone, which calculates offsets from the local time to UTC.
There are four operations provided by the
- Converting the local
- Converting the UTC
DateTime<Tz>to the local
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.
format(), and provided by an associated type
Offset (which then passed to
TimeZone for actual implementations).
TimeZone has a total knowledge about given timescale,
Offset is used as a cache to avoid the repeated conversion
and provides implementations for 1 and 3.
TimeZone instance can be reconstructed from the corresponding
The time zone with fixed offset, from UTC-23:59:59 to UTC+23:59:59.
The UTC time zone. This is the most efficient time zone when you don't need the local time. It is also used as an offset (which is also a dummy type).
The conversion result from the local time to the timezone-aware datetime types.
The offset from the local time to UTC.
The time zone.