Skip to content

Commit

Permalink
Merge pull request #13 from bxparks/develop
Browse files Browse the repository at this point in the history
0.7 - support DST transitions at 00:01; validate against Hinnant date library; upgrade to TZ 2019b
  • Loading branch information
bxparks authored Aug 13, 2019
2 parents 19fe84a + 4b60ead commit 7c2b39b
Show file tree
Hide file tree
Showing 384 changed files with 7,636 additions and 6,159 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
# Changelog

* Unreleased
* 0.7
* Change TimeZoneData to store mStdOffset and mDstOffset in units of
one minute (instead of 15-minute increments, "code") in the off chance
that the library supports timezones with one-minute shifts in the future.
* Implement TimeOffset using 2 bytes (`int16_t`) instead of one byte
(`int8_t`) to give it a resolution of one minute instead of 15 minutes.
* Generate zoneinfo files containing AT and UNTIL timestamps with
one-minute resolution (instead of 15-minute resolution). ZoneInfo files
(`zonedb/` and `zonedbx/`) remain identical in size. Flash memory
consumption usually increases by 130 to 500 bytes, but sometimes decreases
by 50-100 bytes. Timezones whose DST transitions occur at 00:01
(America/Goose_Bay, America/Moncton, America/St_Johns, Asia/Gaza,
Asia/Hebron) no longer truncate to 00:00.
* Rename `TimeOffset::forHour()` to `forHours()` for consistency with
`forMinutes()`.
* Make `ExtendedZoneProcessor` more memory efficient for 32-bit processors
by packing internal fields to 4-byte boundaries.
* Integrate C++11/14/17
[Hinnant Date](https://github.com/HowardHinnant/date) library by
creating additional `tests/validation` tests.
* Upgrade `zonedb` and `zonedbx` zoneinfo files to version 2019b,
after validating against the Hinnant date library.
* Upgrade to `pytz` version 2019.2 to pickup TZ Database 2019b.
* 0.6.1
* Create a second Jenkins continuous build pipeline file
`tests/JenskinfileUnitHost` to use UnitHostDuino to run the unit tests
Expand Down
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ The AceTime classes are organized into roughly 4 bundles, placed in different
C++ namespaces:

* date and time classes and types
* `ace_time::DateStrings`
* `ace_time::acetime_t`
* `ace_time::DateStrings`
* `ace_time::LocalTime`
* `ace_time::LocalDate`
* `ace_time::LocalDateTime`
Expand Down Expand Up @@ -116,16 +116,22 @@ The library provides 2 sets of zoneinfo files created from the IANA TZ Database:
the TZ Database (essentially the entire database) intended to be used with
the `ExtendedZoneProcessor` class.

These zoneinfo files (and the `ZoneProcessor` classes which calculate the UTC
offsets and DST transitions) have been validated to match the UTC offsets
calculated using the Python [pytz](https://pypi.org/project/pytz/) library from
the year 2000 until 2037 (inclusive), and using the [Java 11
Time](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/package-summary.html)
library from year 2000 to 2049 (inclusive). Custom datasets with smaller or
larger range of years may be generated by developers using scripts provided in
this library (although this is not documented currently). The target application
may be compiled against the custom dataset instead of using `zonedb::` and
`zonedbx::` zone files provided in this library.
These zoneinfo files and the algorithms in this library have been validated to
match the UTC offsets calculated using 3 other date/time libraries:

* the Python [pytz](https://pypi.org/project/pytz/) library from
the year 2000 until 2037 (inclusive),
* the Java JDK 11
[java.time](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/package-summary.html)
library from year 2000 to 2049 (inclusive),
* the C++11/14/17 [Hinnant date](https://github.com/HowardHinnant/date) libary
from year 2000 to 2049 (inclusive).

Custom datasets with smaller or larger range of years may be generated by
developers using scripts provided in this library (although this is not
documented currently). The target application may be compiled against the custom
dataset instead of using `zonedb::` and `zonedbx::` zone files provided in this
library.

It is expected that most applications using AceTime will use only a small number
of timezones at the same time (1 to 3 zones have been extensively tested) and
Expand Down Expand Up @@ -198,9 +204,11 @@ Conversion from an epochSeconds to date-time components including timezone
* 2.8 microseconds on an ESP32,
* 6 microseconds on a Teensy 3.2.

**Version**: 0.6.1 (2019-08-07, TZ DB version 2019a, beta)
**Version**: 0.7 (2019-08-13, TZ DB version 2019b, beta)

**Status**: Stable, no major refactoring planned. Expected to go to 1.0 soon.
**Status**: Upgraded to latest TZ DB version 2019b. Validated against 3
other timezone libraries (Python, Java, C++). See [CHANGELOG.md](CHANGELOG.md)
for more details. API quite stable now.

## Examples

Expand Down
Loading

0 comments on commit 7c2b39b

Please sign in to comment.