2.3.0 - add CompleteZoneManager, zonedbc to extend timezone year range to [0001,10000)
Major Changes in v2.3: Add CompleteZoneProcessor
, CompleteZoneManager
,
and the zonedbc
database to support all timezones, for all transitions defined
in the IANA TZ database ([1844,2087])
, and extending the validity of timezone
calculations from [2000,10000)
to [0001,10000)
.
Migration: MIGRATING.md
Changelog
- 2.3.0 (2023-06-27, TZDB version 2023c)
- Create CustomZoneRegistry example
to illustrate how to use a custom registry. - Update
BasicZoneManager
to detect gaps.- Allows
AceTimeValidation/validation
tests to pass. - Still not able to distinguish between exact and overlap though.
- Allows
- Allow multi-character
ZoneRule.letter
inBasicZoneProcessor
.- Regenerate
zonedb
which enables 2 more zones:/Africa/Windhoek
,
andAmerica/Belize
- Increases
zonedb
by 150-200 bytes.
- Regenerate
- Rename
BrokerFactory
toZoneInfoStore
for better self-documentation.- This is an internal implementation detail. Downstream clients should
not be affected.
- This is an internal implementation detail. Downstream clients should
ZoneContext
- Move
ZoneContext
,letters[]
,fragments[]
into PROGMEM. - Move
zonedbXxx::kTzDatabaseVersion
string into PROGMEM, and change
type toconst __FlashString*
. - Create
ZoneContextBroker
aroundZoneContext
, for consistency
with all other zoneinfo data structures. MergeZoneContext.h
into
ZoneInfo.h
. - Add
startYearAccurate
anduntilYearAccurate
toZoneContext
which
define the interval of accurate transitions. - Saves around 150-200 bytes of RAM on AVR processors,
200-350 bytes of RAM on ESP8266.
- Move
- Cleanly separate zoneinfo storage classes from their brokers classes.
- Three storage implementations instead of one:
zoneinfolow
,
zoneinfomid
,zoneinfohigh
, supporting low, middle, and high time
resolutions. zoneinfohigh
was created to supportCompleteZoneProcessor
,
CompleteZoneManager
and thezonedbc
database.zoneinfomid
initially used inExtendedZoneProcessor
, but now
unused.- Merge
zoneinfo/ZonePolicy.h
intozoneinfo/ZoneInfo.h
. - Convert structs in
zoneinfo/ZoneInfo.inc
into templates, with
synthetictypename S
selector. MergeZoneInfo.inc
into
ZoneInfo.h
.
- Three storage implementations instead of one:
- Support timezones before 1972 using
CompleteZoneManager
,
CompleteZoneProcessor
, andzonedbc
database- Before standardizing on UTC around 1970, many timezones had local
times offsets from UTC which require one-second resolution instead of
one-minute resolution. This requires changing many internal variables
fromint16_t
toint32_t
. - Change
TimeOffset
to support one-second resolution usingint32_t
. - Rename
BasicZone::stdOffseMinutes()
toBasicZone::stdOffset()
which returns aTimeOffset
object. - Rename
ExtendedZone::stdOffseMinutes()
to
ExtendedZone::stdOffset()
which returns aTimeOffset
object. - Leave
BasicZoneProcessor
using one-minute resolution because its
algorithm has an inherent limitations which cannot handle many
timezones before 1972, so no need to convertint16_t
toint32_t
fields. - Add
CompleteZoneManager
,CompleteZoneProcessor
,
CompleteZoneProcessorCache
,CompleteZone
- Add
zonedbc
database which is valid from[1800,10000)
, which
includes all transitions in the TZDB since the first transition is
1844. - Add
scope=complete
to access thezonedbc
database.
- Before standardizing on UTC around 1970, many timezones had local
- Zone Processor with graceful degradation
- Remove range checks against
ZoneContext.startYear()
and
ZoneContext.untilYear()
- Replace with
LocalDate::kMinYear
andLocalDate::kMaxYear
, mostly
for formatting reasons (prevent negative
years, and years with more than 4 digits). - The zone processors will always return something reasonble across the
entireint16_t
range. - Only the accuracy suffers outside of the
startYearAccurate()
and
untilYearAccurate()
limits. - Along with v2.2 which always generates anchor rules for all zone
policies, thestartYearAccureate()
anduntilYearAccurate()
allows
for graceful degradation of classes likeZonedDateTime
for years
outside of this accuracy range.
- Remove range checks against
- Rename
src/tzonedb*
directories- to
src/zonedb*testing
for consistency with other acetime libraries
- to
- Create CustomZoneRegistry example