AceTime
2.3.0
Date and time classes for Arduino that support timezones from the TZ Database.
|
An entry in ZoneInfo which describes which ZonePolicy was being followed during a particular time period. More...
#include <ZoneInfoMid.h>
Public Attributes | |
const ZonePolicy< S > *const | zonePolicy |
Zone policy, determined by the RULES column. More... | |
const char *const | format |
Zone abbreviations (e.g. More... | |
int8_t const | offsetCode |
UTC offset in 15 min increments. More... | |
uint8_t const | deltaCode |
This is a composite of two 4-bit fields: More... | |
int16_t const | untilYear |
Era is valid until currentTime < untilYear. More... | |
uint8_t const | untilMonth |
The month field in UNTIL (1-12). More... | |
uint8_t const | untilDay |
The day field in UNTIL (1-31). More... | |
uint8_t const | untilTimeCode |
The time field of UNTIL field in 15-minute increments. More... | |
uint8_t const | untilTimeModifier |
The untilTimeModifier is a packed field containing 2 pieces of info: More... | |
An entry in ZoneInfo which describes which ZonePolicy was being followed during a particular time period.
Corresponds to one line of the ZONE record in the TZ Database file ending with an UNTIL field. The ZonePolicy is determined by the RULES column in the TZ Database file.
There are 2 types of ZoneEra: 1) zonePolicy == nullptr. Then deltaCode determines the additional offset from offsetCode. A value of '-' in the TZ Database file is stored as 0. 2) zonePolicy != nullptr. Then the deltaCode offset is given by the ZoneRule.deltaCode which matches the time instant of interest.
Definition at line 192 of file ZoneInfoMid.h.
uint8_t const ace_time::zoneinfomid::ZoneEra< S >::deltaCode |
This is a composite of two 4-bit fields:
The ZoneEraBroker::deltaMinutes() and ZoneEraBroker::offsetMinutes() methods know how to convert offsetCode and deltaCode into the appropriate minutes.
Definition at line 246 of file ZoneInfoMid.h.
const char* const ace_time::zoneinfomid::ZoneEra< S >::format |
Zone abbreviations (e.g.
PST, EST) determined by the FORMAT column. It has 3 encodings in the TZ DB files:
1) A fixed string, e.g. "GMT". 2) Two strings separated by a '/', e.g. "-03/-02" indicating "{std}/{dst}" options. 3) A single string with a substitution, e.g. "E%sT", where the "%s" is replaced by the LETTER value from the ZoneRule.
BasicZoneProcessor supports only a single letter subsitution from LETTER, but ExtendedZoneProcessor supports substituting multi-character strings (e.g. "CAT", "DD", "+00").
The TZ DB files use 's' to indicate the substitution, but for simplicity, AceTime replaces the "%s" with just a '' character with no loss of functionality. This also makes the string-replacement code a little simpler. For example, 'EsT' is stored as 'ET', and the LETTER substitution is performed on the '' character.
This field will never be a 'nullptr' if it was derived from an actual entry from the TZ dtabase. There is an internal object named ExtendedZoneProcessor::kAnchorEra
which does set this field to nullptr. Maybe it should be set to ""?
Definition at line 224 of file ZoneInfoMid.h.
int8_t const ace_time::zoneinfomid::ZoneEra< S >::offsetCode |
UTC offset in 15 min increments.
Determined by the STDOFF column.
Definition at line 227 of file ZoneInfoMid.h.
uint8_t const ace_time::zoneinfomid::ZoneEra< S >::untilDay |
The day field in UNTIL (1-31).
Will never be 0. Also, there's no need for untilDayOfWeek, because the database generator will resolve the exact day of month based on the known year and month.
Definition at line 261 of file ZoneInfoMid.h.
uint8_t const ace_time::zoneinfomid::ZoneEra< S >::untilMonth |
uint8_t const ace_time::zoneinfomid::ZoneEra< S >::untilTimeCode |
The time field of UNTIL field in 15-minute increments.
A range of 00:00 to 25:00 corresponds to 0-100.
Definition at line 267 of file ZoneInfoMid.h.
uint8_t const ace_time::zoneinfomid::ZoneEra< S >::untilTimeModifier |
The untilTimeModifier is a packed field containing 2 pieces of info:
Definition at line 279 of file ZoneInfoMid.h.
int16_t const ace_time::zoneinfomid::ZoneEra< S >::untilYear |
Era is valid until currentTime < untilYear.
Comes from the UNTIL column.
Definition at line 251 of file ZoneInfoMid.h.
const ZonePolicy<S>* const ace_time::zoneinfomid::ZoneEra< S >::zonePolicy |
Zone policy, determined by the RULES column.
Set to nullptr if the RULES column is '-' or an explicit DST shift in the form of 'hh:mm'.
Definition at line 197 of file ZoneInfoMid.h.