Skip to content

Commit e45292b

Browse files
authored
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.
1 parent 2ad4598 commit e45292b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/RTC/RTC.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void loop() {
6262
Serial.print(":");
6363
Serial.println(MachineControl_RTCController.getSeconds());
6464

65-
time_t utc_time = time(NULL);
65+
time_t utc_time = MachineControl_RTCController.getEpoch();
6666
Serial.print("Date as UTC time: ");
6767
Serial.println(utc_time);
6868
Serial.println();

0 commit comments

Comments
 (0)