AceTime
1.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.
|
9 using ace_common::printPad2To;
15 printer.print(F(
"<Invalid LocalTime>"));
20 printPad2To(printer, mHour,
'0');
22 printPad2To(printer, mMinute,
'0');
24 printPad2To(printer, mSecond,
'0');
28 if (strlen(timeString) < kTimeStringLength) {
36 const char* s = timeString;
39 uint8_t
hour = (*s++ -
'0');
46 uint8_t
minute = (*s++ -
'0');
53 uint8_t
second = (*s++ -
'0');
static LocalTime forTimeStringChainable(const char *&timeString)
Variant of forTimeString() that updates the pointer to the next unprocessed character.
void printTo(Print &printer) const
Print LocalTime to 'printer' in ISO 8601 format.
bool isError() const
Return true if any component is outside the normal time range of 00:00:00 to 23:59:59.
static LocalTime forError()
Factory method that returns an instance which indicates an error condition.
uint8_t hour() const
Return the hour.
uint8_t second() const
Return the second.
uint8_t minute() const
Return the minute.
LocalTime()
Default constructor does nothing.
static LocalTime forTimeString(const char *timeString)
Factory method.
The time (hour, minute, second) fields representing the time without regards to the day or the time z...