Skip to content

Releases: bxparks/AceTime

v1.5 - officially support STM32; upgrade to TZ DB 2021a; implement fat Links

27 Jan 02:52
3744b0f
Compare
Choose a tag to compare
  • 1.5
    • Use binary search for both ZoneManager::createForZoneName() and
      ZoneManager::createForZoneId().
      • Previously, the zone_registry.cpp was sorted by zoneName, so only
        the createForZoneName() could use the binary search. The new
        solution sorts the zone_registry.cpp entries by zoneId instead of
        zoneName. The createForZoneId() can use the binary search
        algorith.
      • The createForZoneName() can also use the binary search because
        the zoneName is converted dynamically to its zoneId using the same
        djb2 hash algorithm used by the tzcompiler.py. If there is a match,
        a final verification against the exact zoneName is performed to make
        sure that there was no hash collision.
      • Updated AutoBenchmark.ino to determine that a binary search on the
        266 zones in zonedb/zone_registry.cpp is 9-10X faster (on average)
        than a linear search through the same list. (Linear search takes ~190
        iterations; binary search takes ~9 iterations.)
    • Upgrade Link entries to be "fat links".
      • Links become essentially identical to Zone entries, with references to
        the same underlying ZoneEra records.
      • Add kZoneAndLinkRegistry[] array in zone_registry.h that contains
        all Links as well as Zones.
      • Add "Zones and Links" section in USER_GUIDE.md.
    • Implement zoneName compression using ace_common::KString.
      • Saves about 1500-2300 bytes for basic zonedb info files, and
        2500-3400 bytes for extended zonedbx info files.
    • Potentially Breaking Change: Remove transitionBufSize from
      ZoneInfo struct, and migrate to kZoneBufSize{xxx} constants in the
      zone_infos.h files.
      • This was used only in validation tests under tests/validation and
        only for Extended{xxx} tests. Saves 1 byte per Zone on 8-bit
        processors, but none on 32-bit processors due to 4-byte alignment.
      • This should have no impact on client code since this field was used
        only for validation testing.
    • API Breaking Change: Replace BasicZone::name() and shortName()
      with printNameTo() and printShortNameTo(). Same with
      ExtendedZone::name() and shortName(), replaced with printNameTo()
      and printShortNameTo().
      • After implementing zoneName compression, it was no longer possible to
        return a simple pointer to the name and shortName without using
        static memory buffers.
      • I expect almost no one to be using the BasicZone and ExtendedZone
        classes, since they are mostly useful for internal algorithms.
      • Client code that needs the old functionality can use
        BasicZone::printNameTo(Print&),
        BasicZone::printShortNameTo(Print&) (similarly for ExtendedZone)
        to print to a ace_common::PrintStr<> object, then extract the
        c-string using PrintStr::getCstr().
    • Update UnixHostDuino 0.4 to EpoxyDuino 0.5.
    • Explicitly blacklist megaAVR boards, and SAMD21 boards using
      arduino:samd Core >= 1.8.10.
      • This allows a helpful message to be shown to the user, instead of the
        pages and pages of compiler errors.
    • Update TZ Database to 2021a.
    • Officially support STM32 and STM32duino after testing on STM32 Blue Pill.

v1.4.1 - actually upgrade zonedb and zonedbx files to 2020f

31 Dec 03:50
ad95acd
Compare
Choose a tag to compare
  • 1.4.1 (2020-12-30, TZDB version 2020f for real)
    • Actually update src/ace_time/zonedb and src/ace_time/zonedbx
      zone info files to 2020f. Oops.

v1.4 - upgrade to tzdata 2020f; prelim support for STM32; huge refactoring of tools

31 Dec 02:46
ce220dc
Compare
Choose a tag to compare
  • 1.4 (2020-12-30, TZ DB version 2020f)
    • Add entry for ManualZoneManager in
      examples/MemoryBenchmark. It seems to need
      between 0'ish to 250 bytes of flash.
    • Add support for creating and handling a TimePeriod error object.
      • Add kMaxPeriodSeconds and kInvalidPeriodSeconds constants.
      • Add forError() factory method.
      • Add error checking to toSeconds() and TimePeriod(seconds)
        constructor.
      • Printing an error object prints <Invalid TimePeriod>.
    • Add support for the STM32RTC clock on an STM32 through the
      ace_time::clock::StmRtcClock class.
      • Currently experimental and untested.
      • I do not have any STM32 boards right now, so I cannot test this code.
      • See #39 for details.
      • Thanks to Anatoli Arkhipenko (arkhipenko@).
    • Add convenience factory methods for creating manual TimeZone objects.
      Saves a lot of typing by avoiding the TimeOffset objects:
      • TimeZone::forHours()
      • TimeZone::forMinutes()
      • TimeZone::forHourMinute()
    • Fix incorrect kTypeXxx constants in ZoneManager.h. Fortunately, the
      numerical values overlapped perfectly, so didn't cause any bugs in actual
      code.
    • USER_GUIDE.md
      • Add documentation about accessing the meta information about the
        zonedb and zonedbx databases:
        • zonedb::kTzDatabaseVersion
        • zonedb::kZoneContext.startYear
        • zonedb::kZoneContext.untilYear
        • zonedbx::kTzDatabaseVersion
        • zonedbx::kZoneContext.startYear
        • zonedbx::kZoneContext.untilYear
      • Add documentation that the ZonedDateTime must always be within
        startYear and untilYear. An error object will be returned outside
        of that range.
    • Update TZ Database from 2020d to version 2020f
    • Update examples/AutoBenchmark to allow auto-generation of ASCII tables,
      which allows auto-generation of the README.md file. Update CPU
      benchmarks for v1.4 from v0.8, since it is much easier to update these
      numbers now. No significant performance change from v0.8.
    • Huge amounts of Python tools refactoring
      • Convert all remaining % string formatting to f-strings.
      • Convert all internal camelCase dictionary keys to snake_case for
        consistency.
      • Finish adding typing info to pass strict mypy checking.
      • Centralize most typing info into data_types/at_types.py.
      • Move various global constants into data_types/at_types.py.
      • Migrate most Arduino specific transformations into artransformer.py.
      • Move offsetCode, deltaCode, atTimeCode, untilTimeCode, rulesDeltaCode
        calculations and various bit-packing rules (e.g. at_time_modifier,
        ntil_time_modifier) into artransformer.py instead of the
        argenerator.py.
      • Include general and platform specific transformations in
        the JSON (zonedb.json or zonedbx.json) files.
      • Make argenerator.py use only the JSON output instead of making
        its own transformations.
      • Produce both LettersMap and LettersPerPolicy in the JSON file.
      • Unify CommentsCollection into CommentsMap using an Iterable
        in Dict[str, Iterable[str]].
      • Unify all transformer results into TransformerResult.
      • Check hash collisions for Link names, in addition to Zone names.
      • Rename test data generator executables to generate_data.* or some
        variations of it, to avoid confusion with unit tests which are often
        named test_xxx.py.
      • Add --input_dir flag to generate_data.cpp to allow the TZ database
        directory to be specified.
      • Add --ignore_buf_size_too_big to workaround a mismatch between
        the estimated Transition buffer size calculated by bufestimator.py
        and the actual buffer size required by ExtendedZoneProcessor.cpp.
      • Add --skip_checkout flag to tzcompiler.py to allow local
        modifications of the TZ database files to be used for code generation.
      • Add --delta_granularity flag to transformer.py to decouple it
        from --offset_granularity, so that the SAVE and RULES
        granularity can be controlled independently from the STDOFF
        granularity. The --until_at_granularity continues to control AT
        and UNTIL.
      • Make output of zinfo.py --debug to be more readable.
      • Remove --generate_zone_strings from tzcompiler.py which removes
        the ability to create zone_strings.{h,cpp}. The storage and
        optimization of strings are implementation details which seem to be
        better handled later in the pipeline.
      • Increase the range of zonedbpy database from the default
        [2000,2050) to [1974, 2050) to allow zinfo.py to handle a larger
        range of queries.
      • Merge --action and --language flags for tzcompiler.py; only
        --language flag needed right now.
      • Rename RulesMap to PoliciesMap, rules_map to policies_map,
        rule_name to policy_name etc. For consistency with ZonesMap,
        zones_map, and zone_name.
      • Add ZoneId hashes to JSON output files.

v1.3 - better ZoneId support using ZoneManager interface

01 Dec 02:00
564c91d
Compare
Choose a tag to compare
  • 1.3 (2020-11-30, TZ DB version 2020d)
    • Minor tweaks to silence clang++ warnings.
    • Create new ZoneManager interface (pure virtual) which is now the
      non-templatized parent to both BasicZoneManager and
      ExtendedZoneManager. Allows ZoneManager to be passed around
      poloymorphically as a pointer or reference.
    • Fix broken ZoneManager::indexForZoneName() and
      ZoneManager::indexForZoneId() caused by incorrect implementations in
      BasicZoneRegistrar and ExtendedZoneRegistrar.
    • Generate compile-time zoneIds for all zones in the form of
      zonedb::kZoneId{Zone_Name} and zonedbx::kZoneId{Zone_Name} (e.g.
      zonedb::kZoneIdAmerica_Los_Angeles). Can be given directly to
      ZoneManager::createForZoneId().
    • Add constructors to TimeZoneData to allow initializers to set
      union members. Useful for initializing arrays of TimeZoneData.
    • Add ManualZoneManager implementation of ZoneManager which implements
      only createForTimeZoneData(). Useful in applications which support only
      TimeZone::kTypeManual (fixed std and dst offsets) due to memory
      constaints.
    • Add documentation of TimeZoneData, TimeZone::toTimeZoneData(), and
      ZoneManager::createFromTimeZoneData() to USER_GUIDE.md. Looks like I
      added the class in v0.5 but forgot to document it.
    • Implement LocalDateTime::compareTo() using only its components instead
      of internally converting to epochSeconds. Not all LocalDateTime can be
      represented by an epochSeconds, so this change makes the algorithm more
      robust. The semantics of the method should remain unchanged.
    • Update the doxygen docs of the compareTo() methods of LocalDateTime,
      LocalTime, LocalDate, OffsetDateTime and ZonedDateTime to clarify
      the semantics of those operations.

v1.2.1 - add Table of Contents to USER_GUIDE.md

13 Nov 00:42
7a766b3
Compare
Choose a tag to compare
  • 1.2.1 (2020-11-12, TZ DB version 2020d)
    • No functional change in this release. Mostly documentation.
    • Update examples/MemoryBenchmark numbers from v0.8 to v1.2 with
      new auto-generator scripts.
    • Add Table of Contents to USER_GUIDE.md to help navigate the long
      document.

v1.2 - migrate low-level common code to AceCommon library

31 Oct 21:30
e54520e
Compare
Choose a tag to compare
  • 1.2 (2020-10-31, TZ DB version 2020d)
    • Potentially Breaking: AceTime library now depends on the AceCommon
      library (https://github.com/bxparks/AceCommon) to avoid having to maintain
      multiple copies of various utility functions and classes. The API for most
      (if not all) public classes have not changed. A number of internal helper
      classes have moved to the AceCommon library. If you happen to directly use
      some of these, you need to use the AceCommon library instead.
      • Add dependency to AceCommon to all Makefiles.
      • Add a depends attribute to library.properties.
    • Replace various utlity functions and class with those from AceCommon:
      • class TimingStats
      • incrementMod(), incrementModOffset(), printPad2To(),
        printPad3To()
      • strcmp_PP()
      • strchr_P(), strrchr_P() for ESP8266 and ESP32
      • PrintStr
    • Move common/CrcEeprom.h to AceUtils
      (https://github.com/bxparks/AceUtils) library.

1.1.2 - upgrade to TZDB 2020d

25 Oct 21:31
a5fd76c
Compare
Choose a tag to compare

1.1.1 - Upgrade to TZDB version 2020c

18 Oct 21:40
02a56f3
Compare
Choose a tag to compare
  • 1.1.1 (2020-10-18, TZ DB version 2020c)
    • Add documentation for using the PrintStr<N> class from the AceUtils
      library (https://github.com:bxparks/AceUtils) on the various printTo()
      methods. The string content can be retrieved using the
      PrintStr::getCstr() method which returns a normal const char*
      C-string. The PrintStr<N> class replaces an earlier, unreleased version
      that was called CstrPrint<N>.
    • Add 'Validation Tests' GitHub workflow for running
      tests/validation/*Test.
    • Create blacklist.json file for each compare_xxx tools, to disable
      validation checks for DST or abbreviations due to bugs in the 3rd party
      libraries.
    • Add ValidationScope enum to provide better control over whether the
      DST or abbrev fields are validated.
    • Print better diagnostic messages when tests/validation fails in
      BasicTransitionTest and ExtendedTransitionTest classes.
    • Upgrade target version numbers of 3rd party libraries used for
      tests/validation: pytz from 2019.3 to 2020.1, JDK 11.0.6 to 11.0.8.
    • Upgrade to TZDB 2020c.
    • Restrict GitHub Actions workflow to run just BasicHinnantDateTest and
      ExtendedHinnantDateTest, because the other Python and Java tests break
      every time a new TZDB version comes out.
    • Add DEVELOPER.md file containing notes mostly for myself.

upgrade to TZ DB version 2020a

26 Apr 05:25
36b5c61
Compare
Choose a tag to compare
  • 1.1 (2020-04-25, TZ DB version 2020a)
    • Fix broken links in README.md.
    • Fix typos in USER_GUIDE.md and update its version number to 1.0 as it
      should have been back in October.
    • Massive refactor of ./tools processing pipeline and update
      validation/tests.
      • Add mypy strict type checking for Python scripts under tools.
      • Funnel validation*.{h,cpp} code generation through a single program
        using a validation_data.json intermediate file.
      • Funnel processing of TZDB output from transformer.py into a single
        tzdbcollector.py which can produce a tzdb.json output.
      • Separate validator.py processing into a distinct section.
    • Add validation tests against Python dateutil library (similar to
      pytz).
    • Update TZ Database version to 2020a that was released on 2020-04-23.

1.0 - graduate to 1.0 with TZ DB version 2019c

03 Oct 04:13
Compare
Choose a tag to compare
  • 1.0 (2019-10-02, TZ DB version 2019c)
    • Add initial support for GitHub actions to implement continuous integration
      using the unit tests that run under UnitHostDuino.
    • Allow NtpClock to use an existing WiFi connection. Add
      examples/HelloNtpClock/ to demonstrate this. (#24, thanks
      @denis-stepanov).
    • Fix compiler warning about duplicate FPSTR() macro for ESP32 Core
      version >=1.0.3.
    • Generate the zonedb files for the various validation/*Test integration
      tests on-demand, instead of using the zonedb files checked into
      src/ace_time/zonedb[x]. This allows us to match the version of the TZ
      Database used by AceTime to the version used by Java 11, pytz, and Hinnant
      Date, independently of the version that is generated into
      src/ace_time/zonedb[x].
    • Update src/ace_time/zonedb[x] files to TZ version 2019c.
    • Graduate to version 1.0.