AceTime  0.6.1
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 Attributes | Static Public Attributes | List of all members
ace_time::basic::ZoneRule Struct Reference

A time zone transition rule. More...

#include <ZonePolicy.h>

Public Attributes

int8_t const fromYearTiny
 FROM year as an offset from year 2000 stored as a single byte. More...
 
int8_t const toYearTiny
 TO year as an offset from year 2000 stored as a single byte. More...
 
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
 Determined by the suffix in the AT column: 'w'=wall; 's'=standard; 'u'=meridian ('g' and 'z' mean the same as 'u' and are not supported because no current TZ file uses them).
 
int8_t const deltaCode
 Determined by the SAVE column, containing the offset from UTC, in 15-min increments.
 
uint8_t const letter
 Determined by the LETTER column. More...
 

Static Public Attributes

static const int8_t kMaxYearTiny = 126
 The maximum value of fromYearTiny and toYearTiny. 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 12 of file ZonePolicy.h.

Member Data Documentation

◆ atTimeCode

uint8_t const ace_time::basic::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 50 of file ZonePolicy.h.

◆ fromYearTiny

int8_t const ace_time::basic::ZoneRule::fromYearTiny

FROM year as an offset from year 2000 stored as a single byte.

Definition at line 20 of file ZonePolicy.h.

◆ inMonth

uint8_t const ace_time::basic::ZoneRule::inMonth

Determined by the IN column.

1=Jan, 12=Dec.

Definition at line 26 of file ZonePolicy.h.

◆ kMaxYearTiny

const int8_t ace_time::basic::ZoneRule::kMaxYearTiny = 126
static

The maximum value of fromYearTiny and toYearTiny.

Must be < ZoneEra::kMaxUntilYear.

Definition at line 17 of file ZonePolicy.h.

◆ letter

uint8_t const ace_time::basic::ZoneRule::letter

Determined by the LETTER column.

Determines the substitution into the 's' field (implemented here by just a '') of the ZoneInfo::format field. Possible values are 'S', 'D', '-', or a number < 32 (i.e. a non-printable character). If the value is < 32, then this number is an index offset into the ZonePolicy.letters[] array which contains a (const char*) of the actual multi-character letter.

As of TZ DB version 2018i, there are 4 ZonePolicies which have ZoneRules with a LETTER field longer than 1 character:

  • 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 81 of file ZonePolicy.h.

◆ onDayOfMonth

int8_t const ace_time::basic::ZoneRule::onDayOfMonth

Determined by the ON column.

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

Definition at line 44 of file ZonePolicy.h.

◆ onDayOfWeek

uint8_t const ace_time::basic::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 38 of file ZonePolicy.h.

◆ toYearTiny

int8_t const ace_time::basic::ZoneRule::toYearTiny

TO year as an offset from year 2000 stored as a single byte.

Definition at line 23 of file ZonePolicy.h.


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