22
33See the [ README.md] ( README.md ) for introductory background.
44
5- Version: 0.7 (2019-08-13, TZ DB version 2019b, beta)
5+ Version: 0.7.1 (2019-08-13, TZ DB version 2019b, beta)
66
77## Installation
88
@@ -798,6 +798,7 @@ class TimeZone {
798798
799799 TimeOffset getUtcOffset(acetime_t epochSeconds) const;
800800 TimeOffset getDeltaOffset(acetime_t epochSeconds) const;
801+ const char* getAbbrev(acetime_t epochSeconds) const;
801802 TimeOffset getUtcOffsetForDateTime(const LocalDateTime& ldt) const;
802803
803804 bool isUtc() const;
@@ -806,7 +807,6 @@ class TimeZone {
806807
807808 void printTo(Print& printer) const;
808809 void printShortTo(Print& printer) const;
809- void printAbbrevTo(Print& printer, acetime_t epochSeconds) const;
810810};
811811
812812}
@@ -817,6 +817,15 @@ DST offset) at the given `epochSeconds`. The `getDeltaOffset()` returns only the
817817additional DST offset; if DST is not in effect at the given `epochSeconds`, this
818818returns a `TimeOffset` whose `isZero()` returns true.
819819
820+ The `getAbbrev(epochSeconds)` method returns the human-readable timezone
821+ abbreviation used at the given `epochSeconds`. For example, this be "PST" for
822+ Pacific Standard Time, or "BST" for British Summer Time. The returned c-string
823+ should be used as soon as possible (e.g. printed to Serial) because the pointer
824+ points to a temporary buffer whose contents may change upon subsequent calls to
825+ `getUtcOffset()`, `getDeltaOffset()` and `getAbbrev()`. If the abbreviation
826+ needs to be saved for a longer period of time, it should be saved to another
827+ char buffer.
828+
820829The `getUtcOffsetForDateTime(localDateTime)` method returns the best guess of
821830the total UTC offset at the given local date time. This method is not
822831normally expected to be used by the app developer directly. The reaon that this
@@ -845,11 +854,6 @@ last component of the IANA TZ Database zone names. In other words,
845854`"America/Los_Angeles"` is printed as `"Los_Angeles"`. This is helpful for
846855printing on small width OLED displays.
847856
848- The `printAbbrevTo(printer, epochSeconds)` method prints the human-readable
849- timezone abbreviation used at the given `epochSeconds` to the `printer`. For
850- example, this be "PST" for Pacific Standard Time, or "BST" for British Summer
851- Time.
852-
853857#### Manual TimeZone (kTypeManual)
854858
855859The default constructor creates a `TimeZone` in UTC time zone with no
@@ -2585,9 +2589,10 @@ and
25852589[ExtendedValidationUsingHinnantDateTest](tests/validation/ExtendedValidationUsingHinnantDateTest/)
25862590validation tests (in v0.7) which are the AceTime algorithms to the Hinnant Date
25872591algorithms. For all times zones between the years 2000 until 2050, the AceTime
2588- UTC offsets (`TimeZone::getUtcOffset()`) and epochSecond conversion to
2589- date components (`ZonedDateTime::fromEpochSeconds()`) match the results from the
2590- Hinannt Date libraries perfectly.
2592+ UTC offsets (`TimeZone::getUtcOffset()`), timezone abbreviations
2593+ (`TimeZone::getAbbrev()`), and epochSecond conversion to date components
2594+ (`ZonedDateTime::fromEpochSeconds()`) match the results from the Hinannt Date
2595+ libraries.
25912596
25922597### Google cctz
25932598
0 commit comments