AceTime
1.1.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.
src
ace_time
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
}
ace_time::OffsetDateTime::printTo
void printTo(Print &printer) const
Print OffsetDateTime to 'printer' in ISO 8601 format.
Definition:
OffsetDateTime.cpp:15
ace_time::TimeZone::printTo
void printTo(Print &printer) const
Print the human readable representation of the time zone.
Definition:
TimeZone.cpp:12
ace_time::ZonedDateTime::printTo
void printTo(Print &printer) const
Print ZonedDateTime to 'printer'.
Definition:
ZonedDateTime.cpp:15
ace_time::ZonedDateTime::isError
bool isError() const
Return true if any component indicates an error condition.
Definition:
ZonedDateTime.h:136
Generated by
1.8.17