Go to the documentation of this file.
23 enum __attribute__((packed))
week_t {
31 enum __attribute__((packed))
dow_t {
81 init(dstStart, stdStart);
122 time_t
toUTC(time_t local);
145 return isDst ? dstRule.
tag : stdRule.
tag;
173 void calcTimeChanges(
unsigned yr);
183 time_t dstStartUTC = 0;
184 time_t stdStartUTC = 0;
185 time_t dstStartLoc = 0;
186 time_t stdStartLoc = 0;
const char * localTimeTag(time_t local)
Return the appropriate time tag for a local time.
Definition: Timezone.h:163
month_t month
1=Jan
Definition: Timezone.h:64
Definition: Timezone.h:60
@ Last
Definition: Timezone.h:39
@ Apr
Definition: Timezone.h:45
void init(const TimeChangeRule &dstStart, const TimeChangeRule &stdStart)
@ Jul
Definition: Timezone.h:48
@ Nov
Definition: Timezone.h:52
time_t toUTC(time_t local)
Convert the given local time to UTC time.
week_t
Definition: Timezone.h:23
bool locIsDST(time_t local)
Determine whether the given local time is within the DST interval or the Standard time interval.
@ Jun
Definition: Timezone.h:47
@ Fri
Definition: Timezone.h:37
@ Thu
Definition: Timezone.h:36
dow_t
Definition: Timezone.h:31
Timezone()
Definition: Timezone.h:75
const char * timeTag(bool isDst) const
Return the appropriate dalight-savings tag to append to displayed times.
Definition: Timezone.h:143
Class to support local/UTC time conversions using rules.
Definition: Timezone.h:72
Timezone(const TimeChangeRule &dstStart, const TimeChangeRule &stdStart)
Definition: Timezone.h:79
@ Aug
Definition: Timezone.h:49
uint8_t hour
0-23
Definition: Timezone.h:65
@ Jan
Definition: Timezone.h:42
@ Wed
Definition: Timezone.h:35
@ Oct
Definition: Timezone.h:51
const char * utcTimeTag(time_t utc)
Return the appropriate time tag for a UTC time.
Definition: Timezone.h:153
month_t
Definition: Timezone.h:41
@ Fourth
Definition: Timezone.h:43
@ First
Definition: Timezone.h:40
@ Mon
Definition: Timezone.h:33
@ Dec
Definition: Timezone.h:53
@ Third
Definition: Timezone.h:42
@ Sep
Definition: Timezone.h:50
int offset
Offset from UTC in minutes.
Definition: Timezone.h:66
bool utcIsDST(time_t utc)
Determine whether the UTC time is within the DST interval or the Standard time interval.
week_t week
First, Second, Third, Fourth, or Last week of the month.
Definition: Timezone.h:62
@ May
Definition: Timezone.h:46
@ Second
Definition: Timezone.h:41
@ Tue
Definition: Timezone.h:34
dow_t dow
Day of week, 0=Sun.
Definition: Timezone.h:63
@ Sat
Definition: Timezone.h:38
char tag[6]
e.g. DST, UTC, etc.
Definition: Timezone.h:61
@ Feb
Definition: Timezone.h:43
@ Sun
Definition: Timezone.h:32
@ Mar
Definition: Timezone.h:44
time_t toLocal(time_t utc, const TimeChangeRule **p_tcr=nullptr)
Convert the given UTC time to local time, standard or daylight time.