AceTime 3.0.0 Date and time classes for Arduino that support timezones from the TZ Database.

Functions | Variables
BrokerCommon.h File Reference

Helper functions are used in both Basic brokers and Extended brokers. More...

`#include <stdint.h>`
Include dependency graph for BrokerCommon.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Functions
const char * | ace_time::zoneinfo::findShortName (const char *name)
| Return a pointer to the short name of a full ZoneName. More...
const __FlashStringHelper * | ace_time::zoneinfo::findShortName (const __FlashStringHelper *fname)
| Same as fineShortName(const char*) but for flash strings `(const __FlashStringHelper*)`.

## Variables
const int | ace_time::zoneinfo::kAbbrevSize = 6 + 1
| Size of the c-string buffer needed to hold a time zone abbreviation. More...

## Detailed Description

Helper functions are used in both Basic brokers and Extended brokers.

Definition in file BrokerCommon.h.

## Function Documentation

## ◆ findShortName()

const char * ace_time::zoneinfo::findShortName | ( | const char * | name | ) |

Return a pointer to the short name of a full ZoneName.

The short name is the last component, which usually begins after the last separator '/'. If the string has been compressed to be compatible with ace_common::KString, then the last component begins just after the last keyword reference (i.e. a non-printable character < ASCII 32). If the fully qualified name has no '/' or a keyword reference, then the short name is the entire string. The last component of the full ZoneName is never compressed, so we do not need to decompress it using ace_common::KString.

For example:

- "America/Los_Angeles" returns a pointer to "Los_Angeles",
- "\x01Denver" returns a pointer to "Denver", and
- "UTC" returns "UTC".

Definition at line 14 of file BrokerCommon.cpp.

## Variable Documentation

## ◆ kAbbrevSize

const int ace_time::zoneinfo::kAbbrevSize = 6 + 1

Size of the c-string buffer needed to hold a time zone abbreviation.

Longest abbreviation currently seems to be 5 characters (https://www.timeanddate.com/time/zones/) but the TZ database spec says that abbreviations are 3 to 6 characters (https://data.iana.org/time-zones/theory.html#abbreviations), so use 6 as the maximum. Plus one for the terminating NUL character.

Definition at line 30 of file BrokerCommon.h.