AceTime  1.11.7
Date and time classes for Arduino that support timezones from the TZ Database.
Functions
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

uint16_t ace_time::internal::timeCodeToMinutes (uint8_t code, uint8_t modifier)
 Convert (timeCode, timeModifier) fields in ZoneInfo to minutes.
 
uint8_t ace_time::internal::toSuffix (uint8_t modifier)
 Extract the 'w', 's' 'u' suffix from the 'modifier' field, so that they can be compared against kSuffixW, kSuffixS and kSuffixU.
 
const char * ace_time::internal::findShortName (const char *name)
 Return a pointer to the short name of a full ZoneName. More...
 
const __FlashStringHelper * ace_time::internal::findShortName (const __FlashStringHelper *fname)
 Same as fineShortName(const char*) but for flash strings (const __FlashStringHelper*).
 

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::internal::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.