26 #define TZINFO_FIELD_NAME area,
28 #define TZINFO_FIELD_NAME
32 #define TZINFO_FIELD_TZSTR tzstr,
34 #define TZINFO_FIELD_TZSTR
38 #define TZINFO_FIELD_RULES dst_rule, std_rule,
40 #define TZINFO_FIELD_RULES
43 #if TZINFO_WANT_TRANSITIONS
44 #define TZINFO_FIELD_TRANSITIONS tznames, transitions,
46 #define TZINFO_FIELD_TRANSITIONS
50 #define DEFINE_REF_LOCAL(name, refname) \
51 static constexpr decltype(refname)& name = refname;
53 #define TZ_DEFINE_RULE_LOCAL(name, ...) \
54 static constexpr const Rule name PROGMEM {__VA_ARGS__};
56 #define TZ_DEFINE_PSTR_LOCAL(name, s) \
57 static constexpr const char* name PROGMEM_PSTR = s;
59 #define TIMEZONE_BEGIN(clsname, area_, location_) \
60 class clsname : public Timezone { \
62 clsname() : Timezone(fromPosix(tzstr)) { } \
63 TZ_DEFINE_PSTR_LOCAL(location, location_)
65 #define TIMEZONE_END() \
66 static constexpr const Info info PROGMEM { \
71 TZINFO_FIELD_TRANSITIONS \
84 operator time_t()
const
96 static_assert(
sizeof(Transition) == 8,
"Bad Transition def");
107 #if TZINFO_WANT_TZSTR
111 const Rule& dstStart;
112 const Rule& stdStart;
114 #if TZINFO_WANT_TRANSITIONS
132 #if TZINFO_WANT_TZSTR
134 #elif TZINFO_WANT_RULE
135 return Timezone(dstStart, stdStart);
139 #if TZINFO_WANT_TRANSITIONS
150 explicit operator bool()
const
#define PROGMEM
Definition: Arch/Esp32/Components/libc/src/include/sys/pgmspace.h:26
#define PGM_P
Definition: Arch/Esp32/Components/libc/src/include/sys/pgmspace.h:30
TZ::Timezone Timezone
Definition: Timezone.h:383
Class to access an array of integral values stored in flash.
Definition: Array.hpp:124
Class template to access an associative map.
Definition: Map.hpp:118
describes a counted string stored in flash memory
Definition: String.hpp:174
Class to access a Vector of objects stored in flash.
Definition: Vector.hpp:110
The String class.
Definition: WString.h:133
static Timezone fromPosix(const char *tzstr)
#define DEFINE_FSTR_ARRAY_LOCAL(name, ElementType,...)
Like DEFINE_FSTR_ARRAY except reference is declared static constexpr.
Definition: Array.hpp:55
#define DECLARE_FSTR_MAP(name, KeyType, ContentType)
Declare a global Map& reference.
Definition: Map.hpp:42
Definition: Timezone.h:33
static constexpr const Rule PROGMEM rule_none
Definition: tzdb.h:99
const Info * findZone(const String &name)
Find a zone given its full name.
static Tag fromString(const char *s)
Basic information required when displaying or handling local times.
Definition: DateTime.h:144
Tag tag
Abbreviation such as "GMT", "EEST" shown after time.
Definition: DateTime.h:166
static const Info & empty()
PGM_P location
Definition: tzdb.h:103
Describe rules for when daylight/summer time begins, and when standard time begins.
Definition: Timezone.h:124
bool isdst
Definition: tzdb.h:82
int16_t offsetMins
Definition: tzdb.h:81
uint8_t desigidx
Definition: tzdb.h:80
int64_t time
Definition: tzdb.h:79
time_t local() const
Definition: tzdb.h:89