AceTime  0.5.2
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 /*
2  * MIT License
3  * Copyright (c) 2018 Brian T. Park
4  */
5 
6 #include "common/util.h"
7 #include "common/DateStrings.h"
8 #include "ZonedDateTime.h"
9 
10 namespace ace_time {
11 
12 using common::printPad2;
13 using common::DateStrings;
14 
15 // Print ZonedDateTime in ISO 8601 format
16 void ZonedDateTime::printTo(Print& printer) const {
17  if (isError()) {
18  printer.print(F("<Invalid ZonedDateTime>"));
19  return;
20  }
21 
22  mOffsetDateTime.printTo(printer);
23  printer.print('[');
24  mTimeZone.printTo(printer);
25  printer.print(']');
26 }
27 
28 }
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:12
bool isError() const
Return true if any component indicates an error condition.
void printTo(Print &printer) const
Print ZonedDateTime to &#39;printer&#39;.