AceTime  2.1.0
Date and time classes for Arduino that support timezones from the TZ Database.
ZonedExtra.cpp
1 #include "ZonedExtra.h"
2 #include "TimeZone.h"
3 
4 namespace ace_time {
5 
6 // These are defined in the .cpp file to break cyclic dependency.
8  acetime_t epochSeconds,
9  const TimeZone& tz) {
10  return tz.getZonedExtra(epochSeconds);
11 }
12 
13 // These are defined in the .cpp file to break cyclic dependency.
15  const LocalDateTime& ldt,
16  const TimeZone& tz) {
17  return tz.getZonedExtra(ldt);
18 }
19 
20 }
Class that holds the date-time as the components (year, month, day, hour, minute, second) without reg...
Definition: LocalDateTime.h:31
Class that describes a time zone.
Definition: TimeZone.h:86
ZonedExtra getZonedExtra(const LocalDateTime &ldt) const
Return the ZonedExtra information at epochSeconds.
Definition: TimeZone.h:300
static ZonedExtra forLocalDateTime(const LocalDateTime &ldt, const TimeZone &tz)
Return an instance for the given LocalDateTime and TimeZone.
Definition: ZonedExtra.cpp:14
static ZonedExtra forEpochSeconds(acetime_t epochSeconds, const TimeZone &tz)
Return an instance for the given epochSeconds and TimeZone.
Definition: ZonedExtra.cpp:7
int32_t acetime_t
Type for the number of seconds from epoch.
Definition: common.h:24