AceTime  0.3
Date and time classes for Arduino that support timezones from the TZ Database, and a system clock that can synchronize from an NTP server or an RTC chip.
ZonedDateTime.cpp
1 #include "common/util.h"
2 #include "common/DateStrings.h"
3 #include "ZonedDateTime.h"
4 
5 namespace ace_time {
6 
7 using common::printPad2;
8 using common::DateStrings;
9 
10 // Print ZonedDateTime in ISO 8601 format
11 void ZonedDateTime::printTo(Print& printer) const {
12  if (isError()) {
13  printer.print(F("<Invalid ZonedDateTime>"));
14  return;
15  }
16 
17  mOffsetDateTime.printTo(printer);
18  printer.print('[');
19  mTimeZone.printTo(printer);
20  printer.print(']');
21 }
22 
23 }
void printTo(Print &printer) const
Print OffsetDateTime to &#39;printer&#39; in ISO 8601 format.
void printTo(Print &printer) const
Print the human readable representation of the time zone.
Definition: TimeZone.cpp:7
bool isError() const
Return true if any component indicates an error condition.
void printTo(Print &printer) const
Print ZonedDateTime to &#39;printer&#39;.