AceTime
2.2.0
Date and time classes for Arduino that support timezones from the TZ Database.
|
Represents an interval of time where the time zone obeyed a certain UTC offset and DST delta. More...
#include <Transition.h>
Public Member Functions | |
const char * | format () const |
void | log () const |
Used only for debugging. | |
Static Public Member Functions | |
static void | logHourMinute (int16_t minutes) |
Print minutes as [+/-]hh:mm. | |
static void | printTransitions (const char *prefix, const TransitionTemplate *const *begin, const TransitionTemplate *const *end) |
Print an iterable of Transitions from 'begin' to 'end'. | |
Public Attributes | |
const MatchingEraTemplate< ZEB > * | match |
The match which generated this Transition. | |
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... | |
}; | |
acetime_t | startEpochSeconds |
The calculated transition time of the given rule. | |
int16_t | offsetMinutes |
The base offset minutes, not the total effective UTC offset. More... | |
int16_t | deltaMinutes |
The DST delta minutes. | |
char | abbrev [internal::kAbbrevSize] |
The calculated effective time zone abbreviation, e.g. More... | |
const char * | letter |
Storage for the 'letter' field if 'rule' is not null. | |
union { | |
bool isValidPrior | |
During findCandidateTransitions(), this flag indicates whether the current transition is a valid "prior" transition that occurs before other transitions. More... | |
CompareStatus compareStatus | |
During processTransitionCompareStatus(), this flag indicates how the transition falls within the time interval of the MatchingEra. | |
}; | |
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.
Some of the instance variables (e.g. 'isValidPrior', 'compareStatus', 'transitionTime', 'transitionTimeS', 'transitionTimeU', 'letter()' and 'format()') are transient parameters which are in the implementation of the TransitionStorage::init() method.
Other variables (e.g. 'startDateTime', 'startEpochSeconds', 'offsetMinutes', 'deltaMinutes', 'abbrev', 'letterBuf') are essential parameters which are required to find a matching Transition and construct the corresponding ZonedDateTime.
Ordering of fields are optimized along 4-byte boundaries to help 32-bit processors without making the program size bigger for 8-bit processors.
ZEB | type of ZoneEraBroker |
ZPB | type of ZonePolicyBroker |
ZRB | type of ZoneRuleBroker |
Definition at line 114 of file Transition.h.
char ace_time::extended::TransitionTemplate< ZEB, ZPB, ZRB >::abbrev[internal::kAbbrevSize] |
The calculated effective time zone abbreviation, e.g.
"PST" or "PDT".
Definition at line 191 of file Transition.h.
bool ace_time::extended::TransitionTemplate< ZEB, ZPB, ZRB >::isValidPrior |
During findCandidateTransitions(), this flag indicates whether the current transition is a valid "prior" transition that occurs before other transitions.
It is set by setFreeAgentAsPriorIfValid() if the transition is a prior transition.
Definition at line 203 of file Transition.h.
int16_t ace_time::extended::TransitionTemplate< ZEB, ZPB, ZRB >::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 185 of file Transition.h.
DateTuple ace_time::extended::TransitionTemplate< ZEB, ZPB, ZRB >::startDateTime |
Start time expressed using the UTC offset of the current Transition.
Valid after ExtendedZoneProcessor::generateStartUntilTimes() is called.
Definition at line 149 of file Transition.h.
DateTuple ace_time::extended::TransitionTemplate< ZEB, ZPB, ZRB >::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 135 of file Transition.h.
DateTuple ace_time::extended::TransitionTemplate< ZEB, ZPB, ZRB >::transitionTimeS |
Version of transitionTime in 's' mode, using the UTC offset of the previous Transition.
Valid before ExtendedZoneProcessor::generateStartUntilTimes() is called.
Definition at line 143 of file Transition.h.
DateTuple ace_time::extended::TransitionTemplate< ZEB, ZPB, ZRB >::transitionTimeU |
Version of transitionTime in 'u' mode, using the UTC offset of the previous transition.
Valid before ExtendedZoneProcessor::generateStartUntilTimes() is called.
Definition at line 158 of file Transition.h.
DateTuple ace_time::extended::TransitionTemplate< ZEB, ZPB, ZRB >::untilDateTime |
Until time expressed using the UTC offset of the current Transition.
Valid after ExtendedZoneProcessor::generateStartUntilTimes() is called.
Definition at line 164 of file Transition.h.