AceTime
0.7
Date and time classes for Arduino that support timezones from the TZ Database, and a system clock that can synchronize from an NTP server or an RTC chip.
|
Data structure that defines the start of a specific UTC offset as described by the matching ZoneEra and its ZoneRule for a given year. More...
#include <BasicZoneProcessor.h>
Public Member Functions | |
void | log () const |
Used only for debugging. More... | |
Public Attributes | |
ZoneEraBroker | era |
The ZoneEra that matched the given year. More... | |
ZoneRuleBroker | rule |
The Zone transition rule that matched for the the given year. More... | |
acetime_t | startEpochSeconds |
The calculated transition time of the given rule. More... | |
int8_t | yearTiny |
Year which applies to the ZoneEra or ZoneRule. More... | |
int8_t | offsetCode |
The total effective UTC offsetCode at the start of transition, including DST offset. More... | |
int8_t | deltaCode |
The delta offsetCode from "standard time" at the start of transition. | |
char | abbrev [kAbbrevSize] |
The calculated effective time zone abbreviation, e.g. More... | |
Static Public Attributes | |
static const uint8_t | kAbbrevSize = 6 + 1 |
Longest abbreviation currently seems to be 5 characters (https://www.timeanddate.com/time/zones/) but the TZ database spec says that abbreviations are 3 to 6 characters (https://data.iana.org/time-zones/theory.html#abbreviations), so use 6 as the maximum. | |
Data structure that defines the start of a specific UTC offset as described by the matching ZoneEra and its ZoneRule for a given year.
If the ZoneEra does not have a ZoneRule, then the Transition is defined by the start date of the ZoneEra.
The 'era' and 'rule' variables intermediate values calculated during the init() phase. They are used to calculate the 'yearTiny', 'startEpochSeconds', 'offsetCode', 'deltaCode', and 'abbrev' parameters which are used during findMatch() lookup. NOTE: This separation may help move the ZoneInfo and ZonePolicy data structures into PROGMEM.
Ordering of fields optimized along 4-byte boundaries to help 32-bit processors without making the program size bigger for 8-bit processors.
Definition at line 51 of file BasicZoneProcessor.h.
|
inline |
Used only for debugging.
Definition at line 106 of file BasicZoneProcessor.h.
char ace_time::basic::Transition::abbrev[kAbbrevSize] |
The calculated effective time zone abbreviation, e.g.
"PST" or "PDT". When the Transition is initially created using createTransition(), abbrev[0] is set to ZoneRule.letter (to avoid potentially another lookup in PROGMEM). That 'letter' is used later in the init() to generate the correct abbreviation which will replace the 'letter' in here.
Definition at line 103 of file BasicZoneProcessor.h.
ZoneEraBroker ace_time::basic::Transition::era |
The ZoneEra that matched the given year.
NonNullable.
This field is used only during the init() phase, not during the findMatch() phase.
Definition at line 66 of file BasicZoneProcessor.h.
int8_t ace_time::basic::Transition::offsetCode |
The total effective UTC offsetCode at the start of transition, including DST offset.
(Maybe rename this effectiveOffsetCode?) The DST offset is stored at deltaCode.
Definition at line 91 of file BasicZoneProcessor.h.
ZoneRuleBroker ace_time::basic::Transition::rule |
The Zone transition rule that matched for the the given year.
Set to nullptr if the RULES column is '-'. We do not support a RULES column that contains a UTC offset. There are only 2 time zones that has this property as of TZ database version 2018g: Europe/Istanbul and America/Argentina/San_Luis.
This field is used only during the init() phase, not during the findMatch() phase.
Definition at line 78 of file BasicZoneProcessor.h.
acetime_t ace_time::basic::Transition::startEpochSeconds |
The calculated transition time of the given rule.
Definition at line 81 of file BasicZoneProcessor.h.
int8_t ace_time::basic::Transition::yearTiny |
Year which applies to the ZoneEra or ZoneRule.
Definition at line 84 of file BasicZoneProcessor.h.