From 3145f9750f6284b9242d42f78017af3ea6b62d0b Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Mon, 17 Apr 2023 22:16:33 +0200 Subject: [PATCH] update RTC lib --- platformio_orig.ini | 2 +- src/rtctime.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platformio_orig.ini b/platformio_orig.ini index 4c79a735..4d770a5d 100644 --- a/platformio_orig.ini +++ b/platformio_orig.ini @@ -79,7 +79,7 @@ lib_deps_basic = greyrook/libpax @ ^1.1.0 https://github.com/SukkoPera/Arduino-Rokkit-Hash.git bblanchon/ArduinoJson @ ^6.20.1 - makuna/RTC @ ^2.3.6 + makuna/RTC @ ^2.3.7 mathertel/OneButton @ ^2.0.3 lewisxhe/XPowersLib @ ^0.1.5 256dpi/MQTT @ ^2.5.1 diff --git a/src/rtctime.cpp b/src/rtctime.cpp index 97f735f3..5906f1b7 100644 --- a/src/rtctime.cpp +++ b/src/rtctime.cpp @@ -22,7 +22,7 @@ uint8_t rtc_init(void) { #if (TIME_SYNC_COMPILEDATE) // initialize a blank RTC without battery backup with build time RtcDateTime tt = Rtc.GetDateTime(); - time_t t = tt.Epoch32Time(); // sec2000 -> epoch + time_t t = tt.Unix32Time(); // sec2000 -> epoch if (!Rtc.IsDateTimeValid() || !timeIsValid(t)) { ESP_LOGW(TAG, "RTC has no recent time, setting to compiletime"); @@ -53,7 +53,7 @@ time_t get_rtctime(uint16_t *msec) { *msec = 0; if (Rtc.IsDateTimeValid() && Rtc.GetIsRunning()) { RtcDateTime tt = Rtc.GetDateTime(); - t = tt.Epoch32Time(); // sec2000 -> epoch + t = tt.Unix32Time(); // sec2000 -> epoch } // if we have a RTC pulse, we calculate msec