AceTime  0.6
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 
14 // Print ZonedDateTime in ISO 8601 format
15 void ZonedDateTime::printTo(Print& printer) const {
16  if (isError()) {
17  printer.print(F("<Invalid ZonedDateTime>"));
18  return;
19  }
20 
21  mOffsetDateTime.printTo(printer);
22  printer.print('[');
23  mTimeZone.printTo(printer);
24  printer.print(']');
25 }
26 
27 }
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;.