AceTime  1.7.5
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.
ZoneContext.h
1 /*
2  * MIT License
3  * Copyright (c) 2019 Brian T. Park
4  */
5 
6 #ifndef ACE_TIME_COMMON_ZONE_CONTEXT_H
7 #define ACE_TIME_COMMON_ZONE_CONTEXT_H
8 
9 namespace ace_time {
10 namespace internal {
11 
16 struct ZoneContext {
18  static const uint8_t kSuffixW = 0x00;
19 
21  static const uint8_t kSuffixS = 0x10;
22 
24  static const uint8_t kSuffixU = 0x20;
25 
26  /*
27  * Epoch year. Currently always 2000 but could change in the future. We're
28  * leaving this out for now because it's not clear how or if the various
29  * AceTime classes can use this information since the value '2000' is often
30  * a compile-time constant instead of a runtime constant.
31  */
32  //int16_t epoch_year;
33 
35  int16_t startYear;
36 
38  int16_t untilYear;
39 
41  const char* tzVersion;
42 
44  uint8_t numFragments;
45 
47  const char* const* fragments;
48 };
49 
50 } // internal
51 } // ace_time
52 
53 #endif
ace_time::internal::ZoneContext::startYear
int16_t startYear
Start year of the zone files.
Definition: ZoneContext.h:35
ace_time::internal::ZoneContext
Metadata about the zone database.
Definition: ZoneContext.h:16
ace_time::internal::ZoneContext::kSuffixS
static const uint8_t kSuffixS
Represents 's' or standard time.
Definition: ZoneContext.h:21
ace_time::internal::ZoneContext::fragments
const char *const * fragments
Zone Name fragment list.
Definition: ZoneContext.h:47
ace_time::internal::ZoneContext::kSuffixU
static const uint8_t kSuffixU
Represents 'u' or UTC time.
Definition: ZoneContext.h:24
ace_time::internal::ZoneContext::untilYear
int16_t untilYear
Until year of the zone files.
Definition: ZoneContext.h:38
ace_time::internal::ZoneContext::kSuffixW
static const uint8_t kSuffixW
Represents 'w' or wall time.
Definition: ZoneContext.h:18
ace_time::internal::ZoneContext::numFragments
uint8_t numFragments
Number of fragments.
Definition: ZoneContext.h:44
ace_time::internal::ZoneContext::tzVersion
const char * tzVersion
TZ Database version which generated the zone info.
Definition: ZoneContext.h:41