22
33See the [ README.md] ( README.md ) for introductory background.
44
5- Version: 0.8 (2019-08-19 , TZ DB version 2019b, beta)
5+ Version: 0.8.1 (2019-08-26 , TZ DB version 2019b, beta)
66
77## Installation
88
@@ -152,7 +152,7 @@ application, and it will instantly use the new transition rules, without the
152152developer needing to create a new POSIX string. To address the memory constraint
153153problem, the AceTime library is designed to load only of the smallest subset of
154154the TZ Database that is required to support the selected timezones (1 to 3 have
155- fully been tested). Dynamic lookup of the time zone is possible using the
155+ been extensively tested). Dynamic lookup of the time zone is possible using the
156156` ZoneManager ` , and the app develop can customize it with the list of zones that
157157are compiled into the app. On microcontrollers with more than about 32kB of
158158flash memory (e.g. ESP8266, ESP32, Teensy 3.2) and depending on the size of the
@@ -638,7 +638,7 @@ observing Daylight Saving Time (DST).
638638
639639An ` OffsetDateTime ` is an object that can represent a ` LocalDateTime ` which is
640640offset from the UTC time zone by a fixed amount. Internally the ` OffsetDateTime `
641- is a aggregation of ` LocalDateTime ` and ` TimeOffset ` . Use this class for
641+ is an aggregation of ` LocalDateTime ` and ` TimeOffset ` . Use this class for
642642creating and writing timestamps for events which are destined for logging for
643643example. This class does not know about Daylight Saving Time transitions.
644644
@@ -743,9 +743,9 @@ be encoded with (relatively) simple rules from the TZ Database
743743* ` TimeZone::kTypeExtended ` : utilizes a ` ExtendedZoneProcessor ` which can
744744handle all zones in the TZ Database
745745* ` TimeZone::kTypeBasicManaged ` : same as ` kTypeBasic ` but the
746- ` BasicZoneProcessor ` is managed by the `ZoneManager
746+ ` BasicZoneProcessor ` is managed by the ` ZoneManager `
747747* ` TimeZone::kTypeExtendedManaged ` : same as ` kTypeExtended ` but the
748- ` ExtendedZoneProcessor ` is managed by the `ZoneManager
748+ ` ExtendedZoneProcessor ` is managed by the ` ZoneManager `
749749
750750The class hierarchy of ` TimeZone ` is shown below, where the arrow means
751751"is-subclass-of" and the diamond-line means "is-aggregation-of". This is an
@@ -760,8 +760,8 @@ hold a reference to:
760760 ` kTypeExtendedManaged ` ).
761761
762762```
763- . ------------------------------.
764- <>' 0..1 \ 0..1
763+ .- ------------------------------.
764+ <> 0..1 \ 0..1
765765TimeZone <>-------- ZoneProcessor ------- ZoneProcessorCache
766766 ^ ^
767767 | |
@@ -910,7 +910,7 @@ void someFunction() {
910910
911911The zoneinfo files were generated by a script using the TZ Database. This header
912912file is already included in ` <AceTime.h> ` so you don't have to explicitly
913- include it. As of version 2019a of the database, it contains 270 Zone and 182
913+ include it. As of version 2019b of the database, it contains 270 Zone and 182
914914Link entries and whose time change rules are simple enough to be supported by
915915` BasicZoneProcessor ` . The bottom of the ` zone_infos.h ` header file lists 117
916916zones whose zone rules are too complicated for ` BasicZoneProcessor ` .
@@ -987,7 +987,7 @@ namespace. Although the data structures in the 2 namespaces are identical
987987currently (v0.8) but the * values* inside the data structure fields are not
988988the same, and they are interpreted differently.)
989989
990- As of version 2019a of TZ Database, * all* 387 Zone and 205 Link entries from the
990+ As of version 2019b of TZ Database, * all* 387 Zone and 205 Link entries from the
991991following TZ files are supported: ` africa ` , ` antarctica ` , ` asia ` , ` australasia ` ,
992992` backward ` , ` etcetera ` , ` europe ` , ` northamerica ` , ` southamerica ` . There are 3
993993files which are not processed (` backzone ` , ` systemv ` , ` factory ` ) because they
@@ -1465,18 +1465,19 @@ is a `BasicZoneManager` with only 4 zones from the `zonedb::` data set:
14651465#include < AceTime.h>
14661466using namespace ace_time ;
14671467...
1468- static const basic::ZoneInfo* const kBasicZoneRegistry [] ACE_TIME_PROGMEM = {
1468+ static const basic::ZoneInfo* const kZoneRegistry [] ACE_TIME_PROGMEM = {
14691469 &zonedb::kZoneAmerica_Los_Angeles,
14701470 &zonedb::kZoneAmerica_Denver,
14711471 &zonedb::kZoneAmerica_Chicago,
14721472 &zonedb::kZoneAmerica_New_York,
14731473};
14741474
14751475static const uint16_t kZoneRegistrySize =
1476- sizeof (Controller:: kZoneRegistry ) / sizeof (basic::ZoneInfo*);
1476+ sizeof (kZoneRegistry ) / sizeof (basic::ZoneInfo*);
14771477
1478- static const uint16_t NUM_ZONES = 2 ;
1479- static BasicZoneManager<NUM_ZONES> zoneManager (kZoneRegistrySize, kZoneRegistry);
1478+ static const uint16_t CACHE_SIZE = 2 ;
1479+ static BasicZoneManager<CACHE_SIZE> zoneManager (
1480+ kZoneRegistrySize, kZoneRegistry);
14801481```
14811482
14821483Here is the equivalent `ExtendedZoneManager` with 4 zones from the `zonedbx::`
@@ -1494,10 +1495,11 @@ static const extended::ZoneInfo* const kZoneRegistry[] ACE_TIME_PROGMEM = {
14941495};
14951496
14961497static const uint16_t kZoneRegistrySize =
1497- sizeof(Controller:: kZoneRegistry) / sizeof(extended::ZoneInfo*);
1498+ sizeof(kZoneRegistry) / sizeof(extended::ZoneInfo*);
14981499
1499- static const uint16_t NUM_ZONES = 2;
1500- static ExtendedZoneManager<NUM_ZONES> zoneManager(kZoneRegistrySize, kZoneRegistry);
1500+ static const uint16_t CACHE_SIZE = 2;
1501+ static ExtendedZoneManager<CACHE_SIZE> zoneManager(
1502+ kZoneRegistrySize, kZoneRegistry);
15011503```
15021504
15031505The ` ACE_TIME_PROGMEM ` macro is defined in
@@ -1510,7 +1512,7 @@ according to this macro.
15101512See [ CommandLineClock] ( examples/CommandLineClock/ ) for an example of how these
15111513custom registries can be created and used.
15121514
1513- #### createForZoneName
1515+ #### createForZoneName()
15141516
15151517The ` ZoneManager ` allows creation of a ` TimeZone ` using the fully qualified
15161518zone name:
@@ -1539,7 +1541,7 @@ I think the only time the `createForZoneName()` might be useful is if
15391541the user was allowed to type in the zone name, and you wanted to create a
15401542` TimeZone ` from the string typed in by the user.
15411543
1542- #### createForZoneId
1544+ #### createForZoneId()
15431545
15441546Each zone in the ` zonedb:: ` and ` zonedbx:: ` database is given a unique
15451547and stable zoneId. This can be retrieved from the ` TimeZone ` object using:
@@ -1600,21 +1602,21 @@ check for this, and substitute a reasonable default TimeZone when this happens.
16001602This situation is not unique to the zoneId. The same problem would occur if the
16011603fully qualified zone name was used.
16021604
1603- #### createForZoneIndex
1605+ #### createForZoneIndex()
16041606
16051607The ` ZoneManager::createForZoneIndex() ` creates a ` TimeZone ` from its integer
16061608index into the Zone registry, from 0 to ` registrySize - 1 ` . This is useful when
16071609you want to show the user with a menu of zones from the ` ZoneManager ` and allow
16081610the user to select one of the options.
16091611
1610- The ` ZoneManager::indexForZoneNmae () ` and ` ZoneManager::indexForZoneId() ` are
1612+ The ` ZoneManager::indexForZoneName () ` and ` ZoneManager::indexForZoneId() ` are
16111613two useful methods to convert an arbitrary time zone reference (either
16121614by zoneName or zoneId) into an index into the registry.
16131615
16141616### TZ Database Version
16151617
16161618The IANA TZ Database is updated continually. As of this writing, the latest
1617- stable version is 2019a . When a new version of the database is released, it is
1619+ stable version is 2019b . When a new version of the database is released, it is
16181620relatively easy to regenerate the ` zonedb/ ` and ` zonedbx/ ` zoneinfo files.
16191621However, it is likely that I would delay the release of a new version until the
16201622corresponding ` pytz ` package is updated to the latest TZ database version, so
@@ -2420,8 +2422,8 @@ library for all timezones from 2000 to 2049 (inclusive):
24202422* [BasicValidationUsingHinnantDateTest](tests/validation/BasicValidationUsingHinnantDateTest/)
24212423* [ExtendedValidationUsingHinnantDateTest](tests/validation/ExtendedValidationUsingHinnantDateTest/)
24222424
2423- I have validated the AceTime library against the following versions against
2424- the Hinnant date library:
2425+ I have validated the AceTime library with the following TZ versions against
2426+ the Hinnant date library with the same TZ version :
24252427
24262428* TZ Database: 2019a
24272429* TZ Database: 2019b
@@ -2649,19 +2651,21 @@ some time to take a closer look in the future.
26492651 * This library does not support
26502652 [leap seconds](https://en.wikipedia.org/wiki/Leap_second) and will
26512653 probably never do so.
2652- * The library does not implement TAI (International Atomic Time).
2654+ * The library does not implement
2655+ [TAI (International Atomic Time)](https://en.wikipedia.org/wiki/International_Atomic_Time).
26532656 * The `epochSeconds` is like `unixSeconds` in that it is unaware of
2654- leap seconds. When a leap seconds occurs the `epochSeconds` is repeated
2655- over 2 seconds, just like `unixSeconds`.
2657+ leap seconds. When a leap seconds occurs, the `epochSeconds` is held
2658+ constant over 2 seconds, just like `unixSeconds`.
26562659 * The `SystemClock` is unaware of leap seconds so it will continue
26572660 to increment `epochSeconds` through the leap second. In other words,
2658- the SystemClock will be 1 second ahead of UTC.
2661+ the SystemClock will be 1 second ahead of UTC after the leap second
2662+ occurs.
26592663 * If the referenceClock is the `NtpClock`, that clock happens to
26602664 be leap second aware, and the `epochSeconds` will bounce back one
26612665 second upon the next synchronization, becoming synchronized to UTC.
26622666 * If the referenceClock is the `DS3231Clock`, that clock is *not*
26632667 leap second aware, so the `epochSeconds` will continue to be ahead of
2664- UTC by one second.
2668+ UTC by one second even after synchronization .
26652669* `acetime_t`
26662670 * AceTime uses an epoch of 2000-01-01T00:00:00Z.
26672671 The `acetime_t` type is a 32-bit signed integer whose smallest value
@@ -2821,7 +2825,7 @@ some time to take a closer look in the future.
28212825 * The SAMD21 microcontroller does *not* provide any EEPROM. Therefore,
28222826 this feature is disabled in the apps under `examples` (e.g.
28232827 `CommandLineClock`, `OledClock`, and `WorldClock`) which use this feature.
2824- * The `MKR Zero` board generates * far* faster code (30%?) than the `SparkFun
2828+ * The `MKR Zero` board generates far faster code (30%?) than the `SparkFun
28252829 SAMD21 Mini Breakout` board. The `MKR Zero` could be using a different
28262830 (more recent?) version of the GCC tool chain. I have not investigated
28272831 this.
0 commit comments