AceTime
1.2
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"
17 template<u
int8_t SIZE, u
int8_t TYPE,
typename ZS,
typename ZI,
typename ZIB>
18 class ZoneProcessorCacheImpl;
91 virtual const char*
getAbbrev(acetime_t epochSeconds)
const = 0;
104 virtual void printTo(Print& printer)
const = 0;
114 template<u
int8_t SIZE, u
int8_t TYPE,
typename ZS,
typename ZI,
typename ZIB>
129 virtual void setZoneInfo(
const void* zoneInfo) = 0;
134 inline bool operator==(
const ZoneProcessor& a,
const ZoneProcessor& b) {
135 if (a.mType != b.mType)
return false;
139 inline bool operator!=(
const ZoneProcessor& a,
const ZoneProcessor& b) {
virtual bool equals(const ZoneProcessor &other) const =0
Return true if equal.
virtual void setZoneInfo(const void *zoneInfo)=0
Set the opaque zoneInfo.
static const uint8_t kTypeBasic
Indicate BasicZoneProcessor.
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.
static const uint8_t kTypeExtended
Indicate ExtendedZoneProcessor.
virtual const void * getZoneInfo() const =0
Return the opaque zoneInfo.
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.
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.
virtual void printShortTo(Print &printer) const =0
Print a short human-readable identifier (e.g.
Class that describes a time zone.
A cache of ZoneProcessors that provides a ZoneProcessor to the TimeZone upon request.
virtual void printTo(Print &printer) const =0
Print a human-readable identifier (e.g.
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...