AceTime  3.0.0
Date and time classes for Arduino that support timezones from the TZ Database.
Public Attributes | List of all members
ace_time::ZoneInfoLow::ZoneRule Struct Reference

A time zone transition rule. More...

#include <ZoneInfoLow.h>

Public Attributes

int8_t const fromYear
 FROM year.
 
int8_t const toYear
 TO year.
 
uint8_t const inMonth
 Determined by the IN column. More...
 
uint8_t const onDayOfWeek
 Determined by the ON column. More...
 
int8_t const onDayOfMonth
 Determined by the ON column. More...
 
uint8_t const atTimeCode
 Determined by the AT column in units of 15-minutes from 00:00. More...
 
uint8_t const atTimeModifier
 The atTimeModifier is a packed field containing 2 pieces of info: More...
 
uint8_t const deltaCode
 Determined by the SAVE column and contains the offset from UTC, in 15-min increments. More...
 
uint8_t const letterIndex
 Determined by the LETTER column. More...
 

Detailed Description

A time zone transition rule.

It is useful to think of this as a transition rule that repeats on the given (month, day, hour) every year during the interval [fromYear, toYear] inclusive.

Definition at line 135 of file ZoneInfoLow.h.

Member Data Documentation

◆ atTimeCode

uint8_t const ace_time::ZoneInfoLow::ZoneRule::atTimeCode

Determined by the AT column in units of 15-minutes from 00:00.

The range is (0 - 100) corresponding to 00:00 to 25:00.

Definition at line 167 of file ZoneInfoLow.h.

◆ atTimeModifier

uint8_t const ace_time::ZoneInfoLow::ZoneRule::atTimeModifier

The atTimeModifier is a packed field containing 2 pieces of info:

  • The upper 4 bits represent the AT time suffix: 'w', 's' or 'u', represented by kSuffixW, kSuffixS and kSuffixU.
  • The lower 4 bits represent the remaining 0-14 minutes of the AT field after truncation into atTimeCode. In other words, the full AT field in one-minute resolution is (15 * atTimeCode + (atTimeModifier & 0x0f)).

Definition at line 178 of file ZoneInfoLow.h.

◆ deltaCode

uint8_t const ace_time::ZoneInfoLow::ZoneRule::deltaCode

Determined by the SAVE column and contains the offset from UTC, in 15-min increments.

The deltaCode is equal to (originalDeltaCode + 4). Only the lower 4-bits is used, for consistency with the ZoneEra::deltaCode field. This allows the 4-bits to represent DST offsets from -1:00 to 2:45 in 15-minute increments.

The ZonePolicyBroker::deltaMinutes() method knows how to convert this field into minutes.

Definition at line 190 of file ZoneInfoLow.h.

◆ inMonth

uint8_t const ace_time::ZoneInfoLow::ZoneRule::inMonth

Determined by the IN column.

1=Jan, 12=Dec.

Definition at line 143 of file ZoneInfoLow.h.

◆ letterIndex

uint8_t const ace_time::ZoneInfoLow::ZoneRule::letterIndex

Determined by the LETTER column.

Determines the substitution into the 's' field (implemented here by just a '') of the ZoneInfo::format field. This is an index offset into the global kLetters array. Most LETTER string is a single character, e.g. "D", "S", or "". But a small number have LETTER fields which are longer than one character. For example:

  • Belize ('CST'; used by America/Belize)
  • Namibia ('WAT', 'CAT'; used by Africa/Windhoek)
  • StJohns ('DD'; used by America/St_Johns and America/Goose_Bay)
  • Troll ('+00' '+02'; used by Antarctica/Troll)

Definition at line 204 of file ZoneInfoLow.h.

◆ onDayOfMonth

int8_t const ace_time::ZoneInfoLow::ZoneRule::onDayOfMonth

Determined by the ON column.

Used with onDayOfWeek. Possible values are: 0, 1-31, or its corresponding negative values.

Definition at line 161 of file ZoneInfoLow.h.

◆ onDayOfWeek

uint8_t const ace_time::ZoneInfoLow::ZoneRule::onDayOfWeek

Determined by the ON column.

Possible values are: 0, 1=Mon, 7=Sun. There are 4 combinations:

* onDayOfWeek=0, onDayOfMonth=(1-31): exact match
* onDayOfWeek=1-7, onDayOfMonth=1-31: dayOfWeek>=dayOfMonth
* onDayOfWeek=1-7, onDayOfMonth=-(1-31): dayOfWeek<=dayOfMonth
* onDayOfWeek=1-7, onDayOfMonth=0: last{dayOfWeek}
* 

Definition at line 155 of file ZoneInfoLow.h.


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