AceTime
1.0
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.
|
Represents an interval of time where the time zone obeyed a certain UTC offset and DST delta. More...
#include <ExtendedZoneProcessor.h>
Public Member Functions | |
const char * | format () const |
const char * | letter () const |
Return the letter string. More... | |
void | log () const |
Used only for debugging. More... | |
Public Attributes | |
const ZoneMatch * | match |
The match which generated this Transition. More... | |
ZoneRuleBroker | rule |
The Zone transition rule that matched for the the given year. More... | |
DateTuple | transitionTime |
The original transition time, usually 'w' but sometimes 's' or 'u'. More... | |
union { | |
DateTuple transitionTimeS | |
Version of transitionTime in 's' mode, using the UTC offset of the previous Transition. More... | |
DateTuple startDateTime | |
Start time expressed using the UTC offset of the current Transition. More... | |
}; | |
union { | |
DateTuple transitionTimeU | |
Version of transitionTime in 'u' mode, using the UTC offset of the previous transition. More... | |
DateTuple untilDateTime | |
Until time expressed using the UTC offset of the current Transition. More... | |
}; | |
DateTuple | originalTransitionTime |
If the transition is shifted to the beginning of a ZoneMatch, this is set to the transitionTime for debugging. More... | |
acetime_t | startEpochSeconds |
The calculated transition time of the given rule. More... | |
int16_t | offsetMinutes |
The base offset minutes, not the total effective UTC offset. More... | |
int16_t | deltaMinutes |
The DST delta minutes. More... | |
char | abbrev [kAbbrevSize] |
The calculated effective time zone abbreviation, e.g. More... | |
char | letterBuf [2] |
Storage for the single letter 'letter' field if 'rule' is not null. More... | |
bool | active |
Flag used for 2 slightly different meanings at different stages of init() processing. More... | |
Static Public Attributes | |
static const uint8_t | kAbbrevSize = basic::Transition::kAbbrevSize |
Size of the timezone abbreviation. More... | |
Represents an interval of time where the time zone obeyed a certain UTC offset and DST delta.
The start of the interval is given by 'transitionTime' which comes from the TZ Database file. The actual start and until time of the interval (in the local time zone) is given by 'startDateTime' and 'untilDateTime'.
There are 2 types of Transition instances: 1) Simple, indicated by 'rule' == nullptr. The base UTC offsetMinutes is given by match->offsetMinutes. The additional DST delta is given by match->deltaMinutes. 2) Named, indicated by 'rule' != nullptr. The base UTC offsetMinutes is given by match->offsetMinutes. The additional DST delta is given by rule->deltaMinutes.
The 'match', 'rule', 'transitionTime', 'transitionTimeS', 'transitionTimeU', 'active', 'originalTransitionTime', 'letter()' and 'format()' are temporary variables or parameters used in the init() method.
The 'offsetMinutes', 'deltaMinutes', 'startDateTime', 'abbrev' are the derived parameters used in the findTransition() search.
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 174 of file ExtendedZoneProcessor.h.
|
inline |
Return the letter string.
Returns nullptr if the RULES column is empty since that means that the ZoneRule is not used, which means LETTER does not exist. A LETTER of '-' is returned as an empty string "".
Definition at line 278 of file ExtendedZoneProcessor.h.
|
inline |
Used only for debugging.
Definition at line 308 of file ExtendedZoneProcessor.h.
char ace_time::extended::Transition::abbrev[kAbbrevSize] |
The calculated effective time zone abbreviation, e.g.
"PST" or "PDT".
Definition at line 248 of file ExtendedZoneProcessor.h.
bool ace_time::extended::Transition::active |
Flag used for 2 slightly different meanings at different stages of init() processing.
1) During findCandidateTransitions(), this flag indicates whether the current transition is a valid "prior" transition that occurs before other transitions. It is set by setAsPriorTransition() if the transition is a prior transition.
2) During processActiveTransition(), this flag indicates if the current transition falls within the date range of interest.
Definition at line 265 of file ExtendedZoneProcessor.h.
int16_t ace_time::extended::Transition::deltaMinutes |
The DST delta minutes.
Definition at line 245 of file ExtendedZoneProcessor.h.
|
static |
Size of the timezone abbreviation.
Definition at line 176 of file ExtendedZoneProcessor.h.
char ace_time::extended::Transition::letterBuf[2] |
Storage for the single letter 'letter' field if 'rule' is not null.
Definition at line 251 of file ExtendedZoneProcessor.h.
const ZoneMatch* ace_time::extended::Transition::match |
The match which generated this Transition.
Definition at line 179 of file ExtendedZoneProcessor.h.
int16_t ace_time::extended::Transition::offsetMinutes |
The base offset minutes, not the total effective UTC offset.
Note that this is different than basic::Transition::offsetMinutes used by BasicZoneProcessor which is the total effective offsetMinutes. (It may be possible to make this into an effective offsetMinutes (i.e. offsetMinutes
Definition at line 242 of file ExtendedZoneProcessor.h.
DateTuple ace_time::extended::Transition::originalTransitionTime |
If the transition is shifted to the beginning of a ZoneMatch, this is set to the transitionTime for debugging.
May be removed in the future.
Definition at line 230 of file ExtendedZoneProcessor.h.
ZoneRuleBroker ace_time::extended::Transition::rule |
The Zone transition rule that matched for the the given year.
Set to nullptr if the RULES column is '-', indicating that the ZoneMatch was a "simple" ZoneEra.
Definition at line 186 of file ExtendedZoneProcessor.h.
DateTuple ace_time::extended::Transition::startDateTime |
Start time expressed using the UTC offset of the current Transition.
Valid after ExtendedZoneProcessor::generateStartUntilTimes() is called.
Definition at line 208 of file ExtendedZoneProcessor.h.
acetime_t ace_time::extended::Transition::startEpochSeconds |
The calculated transition time of the given rule.
Definition at line 233 of file ExtendedZoneProcessor.h.
DateTuple ace_time::extended::Transition::transitionTime |
The original transition time, usually 'w' but sometimes 's' or 'u'.
After expandDateTuple() is called, this field will definitely be a 'w'. We must remember that the transitionTime* fields are expressed using the UTC offset of the previous Transition.
Definition at line 194 of file ExtendedZoneProcessor.h.
DateTuple ace_time::extended::Transition::transitionTimeS |
Version of transitionTime in 's' mode, using the UTC offset of the previous Transition.
Valid before ExtendedZoneProcessor::generateStartUntilTimes() is called.
Definition at line 202 of file ExtendedZoneProcessor.h.
DateTuple ace_time::extended::Transition::transitionTimeU |
Version of transitionTime in 'u' mode, using the UTC offset of the previous transition.
Valid before ExtendedZoneProcessor::generateStartUntilTimes() is called.
Definition at line 217 of file ExtendedZoneProcessor.h.
DateTuple ace_time::extended::Transition::untilDateTime |
Until time expressed using the UTC offset of the current Transition.
Valid after ExtendedZoneProcessor::generateStartUntilTimes() is called.
Definition at line 223 of file ExtendedZoneProcessor.h.