AceTime  1.7.4
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().
 
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 zoneRegistrySize () const override
 Return the number of elements in the Zone (and fat Link) registry. More...
 
uint16_t linkRegistrySize () const override
 Return the number of elements in the (thin) Link 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-preprocessor conditional code.

Definition at line 83 of file ZoneManager.h.

Member Function Documentation

◆ 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 86 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 115 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 111 of file ZoneManager.h.

◆ zoneRegistrySize()

uint16_t ace_time::ManualZoneManager::zoneRegistrySize ( ) const
inlineoverridevirtual

Return the number of elements in the Zone (and fat Link) registry.

Previously named registrySize().

Implements ace_time::ZoneManager.

Definition at line 119 of file ZoneManager.h.


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