Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge 2.2.0 into master #110

Merged
merged 66 commits into from
Mar 25, 2023
Merged

merge 2.2.0 into master #110

merged 66 commits into from
Mar 25, 2023

Conversation

bxparks
Copy link
Owner

@bxparks bxparks commented Mar 25, 2023

  • 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.

…e that year must be roughly within ZoneContext (startYear, untilYear)
… to '<='

The year interval used by AceTimeTools/bufestimator.py is now slighlty larger
(e.g. `[1950,2090]`) than the year interval used in the validation tests
(usually `[2000,2100)`). (The upper limit of 2090 was determined by
bufestimator.py to the be maximum terminal year, so anything above causes no
change to the buffer size, hence equivalent to the year 2100 used by the
validation tests.)  Sometimes the observed transition buffer size is slightly
smaller than the estimated buffer size.
Also do some clean up, because I think a number of bugs that this file was
trying to overcome has been fixed in the intervening years between 2018 and
2023.
The `const char* letter` was being initialized with a `{0}` because the
previous code defined `letter` as `char letter[2]`, and the test didn't get
updated. Weird thing is that both g++ and clang++ on Linux produced no errors,
nor did all the other Arduino compilers. It was only the ARM g++ for the SAMD21
that complained about this.
…ars on microcontrollers

On desktop (using EpoxyDuino), check the full 8000 year interval [2000, 10000).
On slow microcontrollers, check only 100 years [2000, 2100).
Seeed XIAO seems to need a 1 or 2 delay after flashing before the serial port
monitor can be connected. On the other hand, the ESP8266 must have no delay,
otherwise the output gets lost. So use a flag for XIAO.
@bxparks bxparks merged commit f839c1c into master Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant