1 #ifndef ACE_TIME_MANUAL_ZONE_SPECIFIER_H 2 #define ACE_TIME_MANUAL_ZONE_SPECIFIER_H 5 #include "TimeOffset.h" 6 #include "ZoneSpecifier.h" 64 bool isDst()
const {
return mIsDst; }
67 const char*
stdAbbrev()
const {
return mStdAbbrev; }
70 const char*
dstAbbrev()
const {
return mDstAbbrev; }
102 return mIsDst ? mDstAbbrev : mStdAbbrev;
109 void printTo(Print& printer)
const override;
116 return isDst() == that.isDst()
119 && strcmp(
stdAbbrev(), that.stdAbbrev()) == 0
120 && strcmp(
dstAbbrev(), that.dstAbbrev()) == 0;
130 const char* mStdAbbrev;
133 const char* mDstAbbrev;
TimeOffset getDeltaOffset(acetime_t) const override
Return the DST delta offset at epochSeconds.
ManualZoneSpecifier & operator=(const ManualZoneSpecifier &)=default
Default assignment operator.
int8_t toOffsetCode() const
Return the time offset as the number of 15 minute increments.
void isDst(bool isDst)
Set the current isDst flag.
static TimeOffset forHour(int8_t hour)
Create TimeOffset with the corresponding hour offset.
void printTo(Print &printer) const override
Print a human-readable identifier.
An implementation of ZoneSpecifier which allows the user to manually adjust the UTC offset and the DS...
Base interface for ZoneSpecifier classes.
const char * stdAbbrev() const
Get the standard abbreviation.
static TimeOffset forOffsetCode(int8_t offsetCode)
Create TimeOffset from the offset code.
static const uint8_t kTypeManual
Indicate ManualZoneSpecifier.
void stdOffset(TimeOffset offset)
Set the standard UTC offset.
const char * dstAbbrev() const
Get the DST abbreviation.
A thin wrapper that represents a time offset from a reference point, usually 00:00 at UTC...
ManualZoneSpecifier(TimeOffset stdOffset=TimeOffset(), bool isDst=false, const char *stdAbbrev="", const char *dstAbbrev="", TimeOffset deltaOffset=TimeOffset::forHour(1))
Constructor for a time zone with an offset from UTC that does not change with epochSeconds.
TimeOffset deltaOffset() const
Get the DST delta offset.
TimeOffset getUtcOffset(acetime_t) const override
Return the total UTC offset at epochSeconds, including DST offset.
TimeOffset stdOffset() const
Get the standard UTC offset.
const char * getAbbrev(acetime_t) const override
Return the time zone abbreviation at epochSeconds.
bool isDst() const
Get the current isDst flag.
TimeOffset getUtcOffsetForDateTime(const LocalDateTime &) const override
Return the UTC offset matching the given the date/time components.