AceTime 3.0.0 Date and time classes for Arduino that support timezones from the TZ Database.

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ace_time::extended::TransitionTemplate< D > Struct Template Reference

Represents an interval of time where the time zone obeyed a certain UTC offset and DST delta. More...

`#include <Transition.h>`

Collaboration diagram for ace_time::extended::TransitionTemplate< D >:
[legend]

## Public Member Functions
const char * | format () const
void | log () const
| Used only for debugging.

## Static Public Member Functions
static void | logHourMinuteSecond (int32_t seconds)
| Print seconds as [+/-]hh:mm[:ss].
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< D > * | 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.
int32_t | offsetSeconds
| The standard time offset seconds, not the total offset.
int32_t | deltaSeconds
| The DST delta seconds.
char | abbrev [kAbbrevSize]
| The calculated effective time zone abbreviation, e.g. More...
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.
}; |

## Detailed Description

### template<typename D>
struct ace_time::extended::TransitionTemplate< D >

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 offsetSeconds is given by match->offsetSeconds. The additional DST delta is given by match->deltaSeconds. 2) Named, indicated by 'rule' != nullptr. The base UTC offsetSeconds is given by match->offsetSeconds. The additional DST delta is given by rule->deltaSeconds.

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', 'offsetSeconds', 'deltaSeconds', '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.

Template Parameters

  D | container type of ZoneInfo database

Definition at line 112 of file Transition.h.

## Member Data Documentation

## ◆ abbrev

template<typename D >

char ace_time::extended::TransitionTemplate< D >::abbrev[kAbbrevSize]

The calculated effective time zone abbreviation, e.g.

"PST" or "PDT". Initially this string buffer temporarily holds the `ZoneRule.letter()` string, until `createAbbreviation()` consumes the `letter` and creates the actual abbreviation.

Definition at line 188 of file Transition.h.

## ◆ isValidPrior

template<typename D >

bool ace_time::extended::TransitionTemplate< D >::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 197 of file Transition.h.

## ◆ startDateTime

template<typename D >

DateTuple ace_time::extended::TransitionTemplate< D >::startDateTime

Start time expressed using the UTC offset of the current Transition.

Valid after ExtendedZoneProcessor::generateStartUntilTimes() is called.

Definition at line 147 of file Transition.h.

## ◆ transitionTime

template<typename D >

DateTuple ace_time::extended::TransitionTemplate< D >::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 133 of file Transition.h.

## ◆ transitionTimeS

template<typename D >

DateTuple ace_time::extended::TransitionTemplate< D >::transitionTimeS

Version of transitionTime in 's' mode, using the UTC offset of the previous Transition.

Valid before ExtendedZoneProcessor::generateStartUntilTimes() is called.

Definition at line 141 of file Transition.h.

## ◆ transitionTimeU

template<typename D >

DateTuple ace_time::extended::TransitionTemplate< D >::transitionTimeU

Version of transitionTime in 'u' mode, using the UTC offset of the previous transition.

Valid before ExtendedZoneProcessor::generateStartUntilTimes() is called.

Definition at line 156 of file Transition.h.

## ◆ untilDateTime

template<typename D >

DateTuple ace_time::extended::TransitionTemplate< D >::untilDateTime

Until time expressed using the UTC offset of the current Transition.

Valid after ExtendedZoneProcessor::generateStartUntilTimes() is called.

Definition at line 162 of file Transition.h.

The documentation for this struct was generated from the following file:

- /home/brian/src/AceTimeSuite/libraries/AceTimeLib/src/ace_time/Transition.h