66 Serial.println(
"Failed to find PCF85063 - check your wiring!");
84 Serial.println(
"[ERROR]:Clock integrity is not guaranteed; oscillator has stopped or has been interrupted");
99 Serial.print(
"[RTC ]:");
110 Serial.print(
"[UNIX]:");
111 Serial.print(
" Year :");
printInt(info.tm_year + 1900);
112 Serial.print(
" Month:");
printInt(info.tm_mon + 1);
113 Serial.print(
" Day :");
printInt(info.tm_mday);
114 Serial.print(
" Hour:");
printInt(info.tm_hour);
115 Serial.print(
" Minute:");
printInt(info.tm_min);
116 Serial.print(
" Sec :");
printInt(info.tm_sec);
121 Serial.print(
"Set Unix Time:");
125 utc_tm.tm_year = 2025 - 1900;
136 Serial.print(
"Set UTC time to time zone offset 8 hours:");
140 utc_tm.tm_year = 2025 - 1900;
162 size_t written = strftime(
buf, 64,
"%A, %B %d %Y %H:%M:%S", &timeinfo);
168 written = strftime(
buf, 64,
"%b %d %Y %H:%M:%S", &timeinfo);
173 written = strftime(
buf, 64,
"%A, %d. %B %Y %I:%M%p", &timeinfo);
uint8_t getMinute() const
uint8_t getSecond() const
Driver for the PCF85063 real-time clock (RTC) over I2C.
void setDateTime(RTC_DateTime datetime) override
Set the RTC date and time.
bool begin(SensorCommCustom::CustomCallback callback)
Initialize device using a custom transport callback.
RTC_DateTime getDateTime() override
Read the RTC date and time.
bool isClockIntegrityGuaranteed()
Check whether the clock integrity is guaranteed.
void convertUtcToTimezone(int &year, int &month, int &day, int &hour, int &minute, int &second, int timezoneOffsetSeconds)
Convert UTC time represented by individual values to the time in the specified timezone.