AceTime
1.3
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. | |
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. | |
int16_t | offsetMinutes |
The total effective UTC offset minutes at the start of transition, including DST offset. More... | |
int16_t | deltaMinutes |
The deltaMinutes from "standard time" at the start of transition. | |
int8_t | yearTiny |
Year of the Transition. | |
uint8_t | month |
Month of the transition. More... | |
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', 'offsetMinutes', 'deltaMinutes', and 'abbrev' parameters which are used during findMatch() lookup. This separation helps in moving 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 55 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 113 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 70 of file BasicZoneProcessor.h.
uint8_t ace_time::basic::Transition::month |
Month of the transition.
Copied from ZoneRule.inMonth() if it exists or set to 1 if ZoneRule is null (indicating that the ZoneEra represents a fixed offset for the entire year).
Definition at line 104 of file BasicZoneProcessor.h.
int16_t ace_time::basic::Transition::offsetMinutes |
The total effective UTC offset minutes at the start of transition, including DST offset.
(Maybe rename this effectiveOffsetMinutes?) The DST offset is stored at deltaMinutes.
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 '-' or 'hh:mm'. The fixed DST offset placed in deltaOffset. Two examples of such a timezone isEurope/Istanbul and America/Argentina/San_Luis.
This field is used only during the init() phase, not during the findMatch() phase.
Definition at line 81 of file BasicZoneProcessor.h.