AceTime  1.3
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.
Public Member Functions | List of all members
ace_time::ManualZoneManager Class Reference

A ZoneManager that implements only createForTimeZoneData() to create TimeZones of type kTypeManual, in other words, time zones with fixed STD and DST offsets. More...

#include <ZoneManager.h>

Inheritance diagram for ace_time::ManualZoneManager:
Inheritance graph
[legend]
Collaboration diagram for ace_time::ManualZoneManager:
Collaboration graph
[legend]

Public Member Functions

TimeZone createForZoneName (const char *) override
 Create a TimeZone for the given zone name (e.g. More...
 
TimeZone createForZoneId (uint32_t) override
 Create a TimeZone for the given 32-bit zoneId.
 
TimeZone createForZoneIndex (uint16_t) override
 Create a TimeZone for the given index in the ZoneInfo registry that was used to create this ZoneManager.
 
TimeZone createForTimeZoneData (const TimeZoneData &d) override
 Create a TimeZone from the TimeZoneData created by TimeZone::toTimeZoneData(). More...
 
uint16_t indexForZoneName (const char *) const override
 Find the registry index for the given time zone name. More...
 
uint16_t indexForZoneId (uint32_t) const override
 Find the registry index for the given time zone id. More...
 
uint16_t registrySize () const override
 Return the number of elements in the registry.
 

Additional Inherited Members

- Static Public Attributes inherited from ace_time::ZoneManager
static const uint16_t kInvalidIndex = 0xffff
 Registry index which is not valid. More...
 

Detailed Description

A ZoneManager that implements only createForTimeZoneData() to create TimeZones of type kTypeManual, in other words, time zones with fixed STD and DST offsets.

This is useful in applications designed to run on microcontrollers with small memory where a full BasicZoneManager or ExtendedZoneManager generate too much code. This object can be used anywhere a ZoneManager is expected, which reduces the need for C-precessor conditional code.

Definition at line 76 of file ZoneManager.h.

Member Function Documentation

◆ createForTimeZoneData()

TimeZone ace_time::ManualZoneManager::createForTimeZoneData ( const TimeZoneData d)
inlineoverridevirtual

Create a TimeZone from the TimeZoneData created by TimeZone::toTimeZoneData().

kTypeBasic is interpreted as a kTypeBasicManaged, and kTypeExtended is interpreted as a kTypeExtendedManaged.

Implements ace_time::ZoneManager.

Definition at line 91 of file ZoneManager.h.

◆ createForZoneName()

TimeZone ace_time::ManualZoneManager::createForZoneName ( const char *  name)
inlineoverridevirtual

Create a TimeZone for the given zone name (e.g.

"America/Los_Angeles").

Implements ace_time::ZoneManager.

Definition at line 79 of file ZoneManager.h.

◆ indexForZoneId()

uint16_t ace_time::ManualZoneManager::indexForZoneId ( uint32_t  id) const
inlineoverridevirtual

Find the registry index for the given time zone id.

Returns kInvalidIndex if not found.

Implements ace_time::ZoneManager.

Definition at line 108 of file ZoneManager.h.

◆ indexForZoneName()

uint16_t ace_time::ManualZoneManager::indexForZoneName ( const char *  name) const
inlineoverridevirtual

Find the registry index for the given time zone name.

Returns kInvalidIndex if not found.

Implements ace_time::ZoneManager.

Definition at line 104 of file ZoneManager.h.


The documentation for this class was generated from the following file: