Timezone.h
Go to the documentation of this file.
83 static constexpr time_t minTime = std::max(-5364662400LL, (long long)std::numeric_limits<time_t>::min() + 1);
92 static constexpr time_t maxTime = std::min(253402300799LL, (long long)std::numeric_limits<time_t>::max() - 1);
String toString(TZ::week_t week)
const char * c_str() const
Get a constant (un-modifiable) pointer to String content.
Definition: WString.h:609
time_t toLocal(time_t utc, const Rule **rule=nullptr)
Convert the given UTC time to local time, standard or daylight time.
ZonedTime getTransition(uint16_t year, bool toDst)
Get transition time for the given year.
size_t printTo(Print &p) const
String toString() const
bool locIsDST(time_t local)
Determine whether the given local time is within the DST interval or the Standard time interval.
ZonedTime makeZoned(time_t utc, bool beforeTransition=false)
Obtain a ZonedTime instance for the given UTC.
bool utcIsDST(time_t utc)
Determine whether the UTC time is within the DST interval or the Standard time interval.
Timezone(const Rule &dstStart, const Rule &stdStart)
Create a timezone with daylight savings.
Definition: Timezone.h:194
const char * utcTimeTag(time_t utc)
Return the appropriate time tag for a UTC time.
Definition: Timezone.h:310
bool hasDaylightSavings() const
If dst and std rules are the same we do not use daylight savings.
Definition: Timezone.h:355
ZonedTime getNextChange(time_t utcFrom)
Determine when the next change to/from DST is.
static Timezone fromPosix(const char *tzstr)
Timezone(const Rule &std)
Create a timezone which has no daylight savings.
Definition: Timezone.h:204
const Rule & getRule(bool isDst) const
Get reference to a timechange rule.
Definition: Timezone.h:347
const char * timeTag(bool isDst) const
Return the appropriate dalight-savings tag to append to displayed times.
Definition: Timezone.h:300
const char * localTimeTag(time_t local)
Return the appropriate time tag for a local time.
Definition: Timezone.h:320
A timestamp representing a UTC 'point in time' associated with a specific timezone.
Definition: ZonedTime.h:25
Definition: Timezone.h:33
static constexpr time_t maxTime
Largest future timestamp value we could reasonably want.
Definition: Timezone.h:92
static constexpr time_t invalidTime
Value outside normal range used to indicate abnormal or uninitialised time values.
Definition: Timezone.h:97
static constexpr time_t minTime
Earliest timestamp we might wish to use.
Definition: Timezone.h:83
Type for timezone abbreviation such as "GMT", "EEST".
Definition: DateTime.h:148
Definition: Timezone.h:125
Describe rules for when daylight/summer time begins, and when standard time begins.
Definition: Timezone.h:124
time_t operator()(unsigned year) const
Convert the given time change rule to a time_t value for the given year.
1.9.1