AceTime  2.3.0
Date and time classes for Arduino that support timezones from the TZ Database.
Typedefs | Functions | Variables
common.h File Reference

Identifiers used by implementation code which need to be publically exported. More...

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

Go to the source code of this file.

Typedefs

typedef int32_t ace_time::acetime_t
 Type for the number of seconds from epoch. More...
 

Functions

template<typename T >
void ace_time::internal::swap (T &a, T &b)
 Swap 2 parameters.
 

Variables

const uint8_t ace_time::internal::kAbbrevSize = 6 + 1
 Size of the c-string buffer needed to hold a time zone abbreviation. More...
 

Detailed Description

Identifiers used by implementation code which need to be publically exported.

Definition in file common.h.

Typedef Documentation

◆ acetime_t

typedef int32_t ace_time::acetime_t

Type for the number of seconds from epoch.

The AceTime epoch is 2050-01-01 00:00:00 UTC by default but can be changed using Epoch::currentEpochYear(). Unix epoch is 1970-01-01 00:00:00 UTC.

Definition at line 24 of file common.h.

Variable Documentation

◆ kAbbrevSize

const uint8_t ace_time::internal::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 36 of file common.h.