AceTime
3.0.0
Date and time classes for Arduino that support timezones from the TZ Database.
|
Helper functions are used in both Basic brokers and Extended brokers. More...
#include <stdint.h>
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... | |
Helper functions are used in both Basic brokers and Extended brokers.
Definition in file BrokerCommon.h.
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:
Definition at line 14 of file BrokerCommon.cpp.
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.