AceTime  2.2.0
Date and time classes for Arduino that support timezones from the TZ Database.
ZoneContext.h
1 /*
2  * MIT License
3  * Copyright (c) 2019 Brian T. Park
4  */
5 
6 #ifndef ACE_TIME_ZONE_CONTEXT_H
7 #define ACE_TIME_ZONE_CONTEXT_H
8 
9 namespace ace_time {
10 namespace internal {
11 
16 struct ZoneContext {
23  static const int16_t kMaxUntilYear = 32767;
24 
31  static const int16_t kMaxYear = kMaxUntilYear - 1;
32 
41  static const int16_t kMinYear = -32767;
42 
44  static const uint8_t kSuffixW = 0x00;
45 
47  static const uint8_t kSuffixS = 0x10;
48 
50  static const uint8_t kSuffixU = 0x20;
51 
53  int16_t startYear;
54 
56  int16_t untilYear;
57 
59  int16_t maxTransitions;
60 
62  const char* tzVersion;
63 
65  uint8_t numFragments;
66 
68  uint8_t numLetters;;
69 
71  const char* const* fragments;
72 
74  const char* const* letters;
75 };
76 
77 } // internal
78 } // ace_time
79 
80 #endif
Metadata about the zone database.
Definition: ZoneContext.h:16
static const uint8_t kSuffixW
Represents 'w' or wall time.
Definition: ZoneContext.h:44
uint8_t numLetters
Number of fragments.
Definition: ZoneContext.h:68
uint8_t numFragments
Number of fragments.
Definition: ZoneContext.h:65
static const int16_t kMinYear
The minimum value of fromYear and toYear.
Definition: ZoneContext.h:41
int16_t untilYear
Until year of the zone files.
Definition: ZoneContext.h:56
int16_t startYear
Start year of the zone files.
Definition: ZoneContext.h:53
const char *const * fragments
Zone Name fragment list.
Definition: ZoneContext.h:68
static const int16_t kMaxYear
The maximum value fromYear and toYear.
Definition: ZoneContext.h:31
static const int16_t kMaxUntilYear
The maximum value of untilYear.
Definition: ZoneContext.h:23
const char * tzVersion
TZ Database version which generated the zone info.
Definition: ZoneContext.h:62
int16_t maxTransitions
Max number of transitions required in TransitionStorage.
Definition: ZoneContext.h:59
static const uint8_t kSuffixS
Represents 's' or standard time.
Definition: ZoneContext.h:47
const char *const * letters
Zone Rule letters list.
Definition: ZoneContext.h:74
static const uint8_t kSuffixU
Represents 'u' or UTC time.
Definition: ZoneContext.h:50