From e45292b4f63905c8f411cf37f6eed405e03bba3b Mon Sep 17 00:00:00 2001 From: Giampaolo Mancini Date: Thu, 12 Dec 2024 12:33:23 +0100 Subject: [PATCH] Read time from RTC Read the time value from the RTC. This ensures that the RTC holds the correct values for 48H after removing the power. --- examples/RTC/RTC.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/RTC/RTC.ino b/examples/RTC/RTC.ino index 44df326..ba94ef4 100644 --- a/examples/RTC/RTC.ino +++ b/examples/RTC/RTC.ino @@ -62,7 +62,7 @@ void loop() { Serial.print(":"); Serial.println(MachineControl_RTCController.getSeconds()); - time_t utc_time = time(NULL); + time_t utc_time = MachineControl_RTCController.getEpoch(); Serial.print("Date as UTC time: "); Serial.println(utc_time); Serial.println();