Skip to content

Commit

Permalink
Merge pull request #37 from bxparks/develop
Browse files Browse the repository at this point in the history
merge v1.3 into master
  • Loading branch information
bxparks authored Dec 1, 2020
2 parents 7a766b3 + 48e5d34 commit 564c91d
Show file tree
Hide file tree
Showing 410 changed files with 6,521 additions and 3,113 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
# Changelog

* Unreleased
* 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.
* 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
Expand Down
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ other date/time libraries:
* 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
* the C++11/14/17 Hinnant date (https://github.com/HowardHinnant/date) library
from year 1975 to 2049 (inclusive).

Custom datasets with smaller or larger range of years may be generated by
Expand All @@ -154,8 +154,11 @@ strings can consume precious memory (e.g. 30 bytes for
`"America/Argentina/Buenos_Aires"`) and are not convenient to serialize over the
network or to save to EEPROM. Therefore, the AceTime library provides each
timezone with an alternative `zoneId` identifier of type `uint32_t` which is
guaranteed to be unique and stable. A `TimeZone` object can be saved as a
`zoneId` and then recreated using the `ZoneManager::createFromZoneId()` method.
guaranteed to be unique and stable. For example, the zoneId for
`"America/Los_Angeles"` is provided by `zonedb::kZoneIdAmerica_Los_Angeles` or
`zonedbx::kZoneIdAmerica_Los_Angele` which both have the value `0xb7f7e8f2`. A
`TimeZone` object can be saved as a `zoneId` and then recreated using the
`ZoneManager::createFromZoneId()` method.

The `ace_time::clock` classes collaborate together to implement the
SystemClock which can obtain its time from various sources, such as a DS3231 RTC
Expand Down Expand Up @@ -212,7 +215,7 @@ Conversion from an epochSeconds to date-time components including timezone
* 2.8 microseconds on an ESP32,
* 6 microseconds on a Teensy 3.2.

**Version**: 1.2.1 (2020-11-12, TZ DB version 2020d)
**Version**: 1.3 (2020-11-30, TZ DB version 2020d)

**Changelog**: [CHANGELOG.md](CHANGELOG.md)

Expand Down Expand Up @@ -376,8 +379,7 @@ void setup() {
Serial.println();

// Create Sydney by ZoneId
uint32_t syndeyId = BasicZone(&zonedb::kZoneAustralia_Sydney).zoneId();
auto sydneyTz = manager.createForZoneId(syndeyId);
auto sydneyTz = manager.createForZoneId(zonedb::kZoneIdAustralia_Sydney);
auto sydneyTime = pacificTime.convertToTimeZone(sydneyTz);
sydneyTime.printTo(Serial);
Serial.println();
Expand Down Expand Up @@ -471,13 +473,16 @@ for all 3 zones:

## Documentation

* this [README.md](README.md)
* [README.md](README.md) - this file
* [USER_GUIDE.md](USER_GUIDE.md)
* Installation
* Documentation
* Motivation and Design Considerations
* Date and Time classes
* Mutations
* Clock classes
* Error Handling
* Clocks
* Testing
* Benchmarks
* Comparison to Other Libraries
* Bugs and Limitations
Expand Down
Loading

0 comments on commit 564c91d

Please sign in to comment.