AceTime  1.7.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.
Public Member Functions | Public Attributes | List of all members
ace_time::basic::TransitionTemplate< ZIB, ZEB, ZPB, ZRB > Struct Template Reference

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

ZEB era
 The ZoneEra that matched the given year. More...
 
ZRB 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 [internal::kAbbrevSize]
 The calculated effective time zone abbreviation, e.g. More...
 

Detailed Description

template<typename ZIB, typename ZEB, typename ZPB, typename ZRB>
struct ace_time::basic::TransitionTemplate< ZIB, ZEB, ZPB, ZRB >

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.

Template Parameters
ZIBtype of ZoneInfoBroker
ZEBtype of ZoneEraBroker
ZPBtype of ZonePolicyBroker
ZRBtype of ZoneRuleBroker

Definition at line 59 of file BasicZoneProcessor.h.

Member Data Documentation

◆ abbrev

template<typename ZIB , typename ZEB , typename ZPB , typename ZRB >
char ace_time::basic::TransitionTemplate< ZIB, ZEB, ZPB, ZRB >::abbrev[internal::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 108 of file BasicZoneProcessor.h.

◆ era

template<typename ZIB , typename ZEB , typename ZPB , typename ZRB >
ZEB ace_time::basic::TransitionTemplate< ZIB, ZEB, ZPB, ZRB >::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 65 of file BasicZoneProcessor.h.

◆ month

template<typename ZIB , typename ZEB , typename ZPB , typename ZRB >
uint8_t ace_time::basic::TransitionTemplate< ZIB, ZEB, ZPB, ZRB >::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 99 of file BasicZoneProcessor.h.

◆ offsetMinutes

template<typename ZIB , typename ZEB , typename ZPB , typename ZRB >
int16_t ace_time::basic::TransitionTemplate< ZIB, ZEB, ZPB, ZRB >::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 86 of file BasicZoneProcessor.h.

◆ rule

template<typename ZIB , typename ZEB , typename ZPB , typename ZRB >
ZRB ace_time::basic::TransitionTemplate< ZIB, ZEB, ZPB, ZRB >::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 76 of file BasicZoneProcessor.h.


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