Skip to content

Releases: bxparks/AceTime

2.3.2 - upgrade to TZDB 2024a

27 Jul 01:14
3ee151d
Compare
Choose a tag to compare
  • 2.3.2 (2024-07-25, TZDB version 2024a)
    • Upgrade TZDB to 2024a
    • Increase minimum python version to 3.10.

2.3.1 - upgrade to TZDB 2023d

12 Jan 21:35
373ce16
Compare
Choose a tag to compare
  • 2.3.1 (2024-01-12, TZDB version 2023d)
    • Upgrade TZDB to 2023d
      • https://mm.icann.org/pipermail/tz-announce/2023-December/000080.html
      • "Ittoqqortoormiit, Greenland changes time zones on 2024-03-31. Vostok,
        Antarctica changed time zones on 2023-12-18. Casey, Antarctica changed
        time zones five times since 2020. Code and data fixes for Palestine
        timestamps starting in 2072. A new data file zonenow.tab for
        timestamps starting now."

2.3.0 - add CompleteZoneManager, zonedbc to extend timezone year range to [0001,10000)

28 Jun 00:10
3e58e09
Compare
Choose a tag to compare

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.
    • Allow multi-character ZoneRule.letter in BasicZoneProcessor.
      • Regenerate zonedb which enables 2 more zones: /Africa/Windhoek,
        and America/Belize
      • Increases zonedb by 150-200 bytes.
    • Rename BrokerFactory to ZoneInfoStore for better self-documentation.
      • This is an internal implementation detail. Downstream clients should
        not be affected.
    • ZoneContext
      • Move ZoneContext, letters[], fragments[] into PROGMEM.
      • Move zonedbXxx::kTzDatabaseVersion string into PROGMEM, and change
        type to const __FlashString*.
      • Create ZoneContextBroker around ZoneContext, for consistency
        with all other zoneinfo data structures. Merge ZoneContext.h into
        ZoneInfo.h.
      • Add startYearAccurate and untilYearAccurate to ZoneContext which
        define the interval of accurate transitions.
      • Saves around 150-200 bytes of RAM on AVR processors,
        200-350 bytes of RAM on ESP8266.
    • 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 support CompleteZoneProcessor,
        CompleteZoneManager and the zonedbc database.
      • zoneinfomid initially used in ExtendedZoneProcessor, but now
        unused.
      • Merge zoneinfo/ZonePolicy.h into zoneinfo/ZoneInfo.h.
      • Convert structs in zoneinfo/ZoneInfo.inc into templates, with
        synthetic typename S selector. Merge ZoneInfo.inc into
        ZoneInfo.h.
    • Support timezones before 1972 using CompleteZoneManager,
      CompleteZoneProcessor, and zonedbc 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
        from int16_t to int32_t.
      • Change TimeOffset to support one-second resolution using int32_t.
      • Rename BasicZone::stdOffseMinutes() to BasicZone::stdOffset()
        which returns a TimeOffset object.
      • Rename ExtendedZone::stdOffseMinutes() to
        ExtendedZone::stdOffset() which returns a TimeOffset 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 convert int16_t to int32_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 the zonedbc database.
    • Zone Processor with graceful degradation
      • Remove range checks against ZoneContext.startYear() and
        ZoneContext.untilYear()
      • Replace with LocalDate::kMinYear and LocalDate::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
        entire int16_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, the startYearAccureate() and untilYearAccurate() allows
        for graceful degradation of classes like ZonedDateTime for years
        outside of this accuracy range.
    • Rename src/tzonedb* directories
      • to src/zonedb*testing for consistency with other acetime libraries

2.2.3 - auto zone processor cache invalidation; add SAMD21, SAMD51 back into Tier 1 suport

01 Jun 03:02
403f08e
Compare
Choose a tag to compare
  • 2.2.3 (2023-05-31, TZDB version 2023c)
    • Update ace_time/testing/* classes to support splitting the test data
      into 2 separate lists: transitions and samples.
      • Required to support new validation_data.json from AceTimeValidation.
    • Update AceTimeValidation test names to tests/Xxx{Basic,Extended}Test.
    • Add ZonedExtra::kAbbrevSize to define the char buffer size needed to
      hold an abbreviation.
    • Change ZonedExtra::kInvalidMinutes from public to private.
      • This is an implementation detail.
      • Use ZonedExtra::isError() instead.
    • Rename AceTimePython to acetimepy.
    • ZoneProcessor transition cache
      • Save the epoch year, and automatically invalidate and regenerate the
        cache when the Epoch::currentEpochYear() is modified.
      • Remove cache invalidation methods which are no longer needed:
        • ZoneProcessor::resetTransitionCache()
        • ZoneProcessorCache::resetZoneProcessors()
        • ZoneManager::resetZoneProcessors()
    • Rename "Converter Epoch" to "Internal Epoch".
      • Change daysToCurrentEpochFromConverterEpoch() to
        daysToCurrentEpochFromInternalEpoch().
      • This is an internal implementation detail, exposed only for testing
        purposes.
    • Update supported boards and tiers
      • Add SAMD21 and SAMD51 boards to Tier 1
        • Add Adafruit ItsyBitsy M4 (SAMD51 120MHz ARM Cortex-M4)
        • SAMD21 and SAMD51 boards are back in Tier 1, as long as they use
          the traditional Arduino API instead of the new
          Arduino-Core.
        • Fortunately most third party SAMD21 and SAMD51 boards continue to
          use the traditional Arduino API.
      • Move Teensy 3.2 to Tier 2
        • This board is entering end-of-life.
        • As well, the Teensyduino environment integrates with the Arduino
          IDE and CLI in a way that's different than all other third-party
          Arduino boards. Some of my automation scripts do not work with
          Teensyduino, so it becomes very time consuming to test the Teensy
          boards.
        • All Teensy boards are now in Tier 2 ("Should work but not tested
          often").

2.2.2 - upgrade to TZDB 2023c

01 Apr 17:32
e580545
Compare
Choose a tag to compare
  • 2.2.2 (2023-04-01, TZDB version 2023c)
    • Upgrade TZDB from 2023b to 2023c.
      • https://mm.icann.org/pipermail/tz-announce/2023-March/000079.html
        • "This release's code and data are identical to 2023a. In other
          words, this release reverts all changes made in 2023b other than
          commentary, as that appears to be the best of a bad set of
          short-notice choices for modeling this week's daylight saving
          chaos in Lebanon."
    • AceTime is forced to upgrade to 2023c, because we skipped 2023a and went
      directly to 2023b, which is being rolled back by 2023c.

2.2.1 - upgrade to TZDB 2023b; immutable TimeZone; support SAMD21 again

25 Mar 04:09
Compare
Choose a tag to compare
  • 2.2.1 (2023-03-24, TZDB version 2023b)
    • Actually regenerate the zonedb* files to 2023b.
  • 2.2.0 (2023-03-24, TZDB version 2023b)
    • Upgrade TZDB from 2022g to 2023b
    • Bug Fix
      • Change arguments for TimeZone::forMinutes() from uint8_t to
        uint16_t.
    • Breaking Change
      • Make TimeZone effectively immutable, by removing setStdOffset()
        and setDstOffset() methods.
      • Client applications should create a new TimeZone object using
        TimeZone::forTimeOffset(std, dst) and overwrite the old one.
      • See Migrating to v2.2.
    • Add support for Seeed Studio XIAO M0 (SAMD21).
      • Required updating zoneino/compat.h to clobber the broken definition
        of FPSTR() in Seeeduino 1.8.3.
    • Simplify the handling of Rule.LETTER.
      • Encode all letters as an index into ZoneContext.letters array, not
        just LETTER which are only a single character.
      • On 8-bit AVR:
        • Increases BasicZoneProcessor by ~200 bytes when 1-2 zones are
          used. But flash remains the same when the full TZ database is
          used.
        • No change to ExtendedZoneProcessor for 1-2 zones. But decreases
          flash usage by ~300 bytes when the full TZ database is used.
      • The small increase in flash is worth it because this greatly
        simplifies the complicated code surrounding LETTER that was difficult
        to understand and maintain.
    • Unify Basic and Extended zoneinfo encoding.
      • Change encoding of basic::ZoneRule.deltaCode,
        basic::ZoneEra.deltaCode, and basic::ZoneEra.offsetCode to be
        identical their counterparts in extended::ZoneXxx.
      • Merge BasicBrokers.h and ExtendedBrokers.h into just Brokers.h.
    • Restructure zonedb directories
      • Lift ace_time/internal/testing/tzonedb[x] database files
        to ace_time/tzonedb[x].
      • Lift ace_time/zonedb[x] database files to ace_time/zonedb[x].
      • These changes are transparent to client apps because the C++
        namespaces of these files are unchanged.
      • Lift ace_time/internal/Zone*.h files into new src/zoneinfo/
        directory. These are the classes that describe the *zonedb*
        databases.
    • Add ZonedDateTime::offsetDateTime()
      • Returns the underlying OffsetDateTime inside the ZonedDateTime.
      • Analogous to ZonedDateTime::localDateTime().
    • Always generate anchor rules in zonedb.
      • Allows ExtendedZoneProcessor to work over all years [0,10000)
        even with truncated zonedb (e.g. [2000,2100)).
      • Accuracy is guaranteed only for the requested interval (e.g.
        [2000,2100).
      • But the code won't crash outside of that interval.

2.1.1 - update AutoBenchmark; add ZonedExtra::forComponents() for consistency

03 Feb 00:05
cad5940
Compare
Choose a tag to compare
  • 2.1.1 (2023-02-02, TZDB version 2022g)
    • ZonedExtra
      • Add ZonedExtra::forComponents() factory method, for consistency with
        ZonedDateTime class.
    • examples/AutoBenchmark
      • Add ZonedExtra benchmarks.
    • README.md
      • Update AceTimeValidation validation years to [2000,2100).
      • Update memory and cpu benchmarks.

v2.1.0 - unified links; simplify TimeZone using ZonedExtra class

30 Jan 03:51
Compare
Choose a tag to compare
  • 2.1.0 (2023-01-29, TZDB version 2022g)
    • There are a handful API breaking changes in this release in the pursuit of
      simpler and cleaner code. See the following for more info:
    • Potentially Breaking: zonedb,zonedbx
      • Rename kPolicyXxx to kZonePolicyXxx for consistency. These are
        expected to be used only internally, so shouldn't cause external
        breakage.
    • Breaking: TimeZone.h
      • Replace 3 separate extraction methods in TimeZone with a new
        ZonedExtra class
      • Removed: TimeZone::getUtcOffset()
        • Replaced by: ZonedExtra::timeOffset()
      • Removed: TimeZone::getDeltaOffset()
        • Replaced by: ZonedExtra::dstOffset()
      • Removed TimeZone::getAbbrev()
        • Replaced by: ZonedExtra::abbrev()
        • ZonedExtra::abbrev() returns pointer to a local string buffer
          instead of a transient buffer deep inside Transition object.
        • TimeZone becomes closer to being thread-safe
    • New Class: ZonedExtra.h
      • ZonedExtra::forEpochSeconds(epochSeconds, tz)
        • Create instance from epochSeconds and time zone.
      • ZonedExtra::forLocalDateTime(ldt, tz)
        • Create instance from LocalDateTime and time zone.
    • Potentially Breaking: Unified Links
      • Links are now first-class citizens, exactly the same as Zones.
      • Unify "fat links" and "symbolic links" into a single implementation.
      • Remove "thin links" to simplify the code.
      • TimeZone class simplified
        • Removed followLink flag on various methods.
        • Only 2 methods apply to Links: isLink() and
          printTargetNameTo().
    • Simplify ZoneProcessors
      • ZoneProcessor.h, ExtendedZoneProcessor.h, BasicZoneProcessor.h
      • Remove: getUtcOffset(), getDeltaOffset(), getAbbrev()
      • Replaced by: findByLocalDateTime(), findByEpochSeconds()
      • These are internal helper methods not intended for public consumption.
    • Unit tests
      • Migrate most unit tests to use the smaller, testing zone databases at
        testing/tzonedb/ and testing/tzonedbx/.
        • Reduces maintenance cost of various hand-crafted ZoneInfo and
          ZonePolicy entries for unit tests.
        • Can test against real timezones with predictable behavior.

2.0.1 - upgrade to TZDB 2022g; include notable policies in notable zones comments

04 Dec 19:11
cdf3adf
Compare
Choose a tag to compare
  • 2.0.1 (2022-12-04, TZDB 2022g)
    • Prevent ExtendedZoneProcssor::generateStartUntilTimes() from
      dereferencing uninitialized memory if there are no matching transitions.
      • This may happen if zonedbx is accidentally corrupted (e.g. by using
        one with int8 year fields instead of int16 year fields).
    • Incorporate notable zone_policies.h comments into notable
      zone_infos.h.
    • Upgrade TZDB from 2022f to 2022g
      • https://mm.icann.org/pipermail/tz-announce/2022-November/000076.html
        • The northern edge of Chihuahua changes to US timekeeping.
        • Much of Greenland stops changing clocks after March 2023.
        • Fix some pre-1996 timestamps in northern Canada.
        • C89 is now deprecated; please use C99 or later.
        • Portability fixes for AIX, libintl, MS-Windows, musl, z/OS
        • In C code, use more C23 features if available.
        • C23 timegm now supported by default
        • Fixes for unlikely integer overflows

expand timezone support from [2000,2050) to [2000,2100); allow adjustable epoch year

04 Nov 23:57
09175d4
Compare
Choose a tag to compare
  • 2.0 (2022-11-04, TZDB 2022f) Breaking Change See
    Migrating to 2.0.0
    • Change internal storage type of year component from int8_t to
      int16_t, extending the range of valid years from [-1873,2127] to
      [1,9999].
      • Remove yearTiny() getters and setters from LocalDate,
        LocalDateTime, OffsetDateTime, and ZonedDateTime.
        • They were not documented except in doxygen docs.
      • Remove from LocalDate:
        • kInvalidYearTiny, replaced with kInvalidYear
        • kMinYearTiny, replaced with kMinYear
        • kMaxYearTiny, replaced with kMaxYear
        • forTinyComponents()
      • Remove from LocalDateTime
        • forTinyComponents()
      • Update AceTimeTools
        to generate src/zonedb and src/zonedbx using int16_t year types.
    • Extend untilYear of zonedb and
      zonedbx databases to 10000
      • databases now valid over the years [2000,10000)
      • zonedbx adds 75 additional Rules for kPolicyMorocco (e.g.
        zone "Africe/Casablanca") due to the precalculated DST shifts which
        are listed in the IANA TZ DB up to the year 2087.
      • zonedb remains unchanged
    • Change epoch seconds conversion algorithm
      • Extract different epoch date conversion algorithms to be used/tested.
        Two of them are EpochConverterJulian and EpochConverterHinnant
      • Migrate LocalDate to use the EpochConverterHinnant instead of
        EpochConverterJulian.
        • The primary reason is that I am able to fully understand the
          algorithms described in EpochConverterHinnant.
        • In contrast, I have almost no understanding of the algorithms
          implemented by EpochConverterJulian.
    • Configurable epoch year using new Epoch utility class
      • Add Epoch::currentEpochYear() which allows customization of the
        internal epoch year at startup.
        • Expected to be rarely used in user applications, but somewhat
          common in unit testing.
      • Add Epoch::epochValidYearLower() and Epoch::epochValidYearUpper()
        • Defines the 100-year interval which is +/- 50 years from the
          currentEpochYear() where the epoch seconds and time zone
          transition algorithms are guaranteed to be valid.
      • Add cache invalidation methods which must be called if
        currentEpochYear() is changed at runtime.
        • ZoneProcessor::resetTransitionCache()
        • ZoneProcessorCache::resetZoneProcessors()
        • ZoneManager::resetZoneProcessors()
    • Remove toUnixSeconds() and forUnixSeconds() which use the 32-bit
      versions of unix epoch seconds.
      • They will become invalid in the year 2038, and it's now the year 2022
        so it does not seem worth maintaining these.
      • The 64-bit versions toUnixSeconds64() and forUnixSeconds64() are
        retained.
    • Flash usage increases (see MemoryBenchmark for
      more details:
      • AVR:
        • BasicZoneManager increases ~200 bytes
        • ExtendedZoneManager increases ~500 bytes
        • zonedb increases ~1.5 kiB
        • zonedbx increases ~3 kiB
      • ESP8266
        • BasicZoneManager increases ~50 bytes
        • ExtendedZoneManager increases ~150 bytes
        • zonedb increases ~300 bytes
        • zonedbx increases ~1.5 kiB