AceTime
1.6
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.
|
6 #ifndef ACE_TIME_ZONE_PROCESSOR_H
7 #define ACE_TIME_ZONE_PROCESSOR_H
9 #include "common/common.h"
10 #include "TimeOffset.h"
11 #include "OffsetDateTime.h"
72 virtual const char*
getAbbrev(acetime_t epochSeconds)
const = 0;
105 virtual void setZoneKey(uintptr_t zoneKey) = 0;
130 inline bool operator==(
const ZoneProcessor& a,
const ZoneProcessor& b) {
131 if (a.mType != b.mType)
return false;
135 inline bool operator!=(
const ZoneProcessor& a,
const ZoneProcessor& b) {
148 static const uint8_t kAbbrevSize = 6 + 1;
173 MonthDay calcStartDayOfMonth(int16_t year, uint8_t month,
174 uint8_t onDayOfWeek, int8_t onDayOfMonth);
virtual bool equals(const ZoneProcessor &other) const =0
Return true if equal.
virtual void printShortNameTo(Print &printer) const =0
Print a short human-readable identifier (e.g.
Class that holds the date-time as the components (year, month, day, hour, minute, second) without reg...
virtual uint32_t getZoneId() const =0
Return the unique stable zoneId.
ZoneProcessor(uint8_t type)
Constructor.
virtual void setZoneKey(uintptr_t zoneKey)=0
Set the opaque zoneKey of this object to a new value, reseting any internally cached information.
uint8_t getType() const
Return the kTypeXxx of the current instance.
A thin wrapper that represents a time offset from a reference point, usually 00:00 at UTC,...
virtual TimeOffset getDeltaOffset(acetime_t epochSeconds) const =0
Return the DST delta offset at epochSeconds.
virtual void printNameTo(Print &printer) const =0
Print a human-readable identifier (e.g.
The date (year, month, day), time (hour, minute, second) and offset from UTC (timeOffset).
virtual const char * getAbbrev(acetime_t epochSeconds) const =0
Return the time zone abbreviation at epochSeconds.
Base interface for ZoneProcessor classes.
virtual TimeOffset getUtcOffset(acetime_t epochSeconds) const =0
Return the total UTC offset at epochSeconds, including DST offset.
The result of calcStartDayOfMonth().
virtual OffsetDateTime getOffsetDateTime(const LocalDateTime &ldt) const =0
Return the best estimate of the OffsetDateTime at the given LocalDateTime for the timezone of the cur...
virtual bool equalsZoneKey(uintptr_t zoneKey) const =0
Return true if ZoneProcessor is associated with the given opaque zoneKey.