AceTime  2.3.0
Date and time classes for Arduino that support timezones from the TZ Database.
Public Member Functions | List of all members
ace_time::CompleteZone Class Reference

A thin wrapper around an complete::ZoneInfo data structure to provide a stable API access to some useful complete::ZoneInfo data. More...

#include <CompleteZone.h>

Public Member Functions

 CompleteZone (const complete::ZoneInfo *zoneInfo)
 Constructor from a raw complete::ZoneInfo* pointer, intended for manual inspection of a ZoneInfo record.
 
 CompleteZone (const complete::ZoneInfoBroker &zoneInfo)
 Constructor from an complete::ZoneInfoBroker, used by CompleteZoneProcessor. More...
 
 CompleteZone (const CompleteZone &)=default
 
CompleteZoneoperator= (const CompleteZone &)=default
 
bool isNull () const
 Return true if zoneInfo is null.
 
void printNameTo (Print &printer) const
 Print the full zone name to printer. More...
 
void printShortNameTo (Print &printer) const
 Print the short pretty zone name to the printer. More...
 
uint32_t zoneId () const
 Return the zoneId of the current zoneInfo.
 
TimeOffset stdOffset () const
 Return the STDOFF of the last ZoneEra.
 
ace_common::KString kname () const
 Return the name as a KString.
 

Detailed Description

A thin wrapper around an complete::ZoneInfo data structure to provide a stable API access to some useful complete::ZoneInfo data.

The complete::ZoneInfo data struct is intended to be an opaque type to the users of this library.

Definition at line 24 of file CompleteZone.h.

Constructor & Destructor Documentation

◆ CompleteZone()

ace_time::CompleteZone::CompleteZone ( const complete::ZoneInfoBroker zoneInfo)
inline

Constructor from an complete::ZoneInfoBroker, used by CompleteZoneProcessor.

This allows the implementation details of ZoneInfoBroker to remain hidden.

Definition at line 38 of file CompleteZone.h.

Member Function Documentation

◆ printNameTo()

void ace_time::CompleteZone::printNameTo ( Print &  printer) const

Print the full zone name to printer.

Example "America/Los_Angeles".

Definition at line 18 of file CompleteZone.cpp.

◆ printShortNameTo()

void ace_time::CompleteZone::printShortNameTo ( Print &  printer) const

Print the short pretty zone name to the printer.

Underscores are replaced with spaces. Example "Los Angeles".

Definition at line 25 of file CompleteZone.cpp.


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