diff --git a/src/gps/RTC.cpp b/src/gps/RTC.cpp index 148782cd7..9053f5b2b 100644 --- a/src/gps/RTC.cpp +++ b/src/gps/RTC.cpp @@ -47,8 +47,8 @@ void readFromRTC() rtc.begin(); auto tc = rtc.getDateTime(); tm t; - t.tm_year = tc.year; - t.tm_mon = tc.month; + t.tm_year = tc.year - 1900; + t.tm_mon = tc.month - 1; t.tm_mday = tc.day; t.tm_hour = tc.hour; t.tm_min = tc.minute; @@ -112,7 +112,7 @@ bool perhapsSetRTC(RTCQuality q, const struct timeval *tv) PCF8563_Class rtc; rtc.begin(); tm *t = localtime(&tv->tv_sec); - rtc.setDateTime(t->tm_year + 1900, t->tm_mon + 1, t->tm_wday, t->tm_hour, t->tm_min, t->tm_sec); + rtc.setDateTime(t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); DEBUG_MSG("PCF8563_RTC setDateTime %02d-%02d-%02d %02d:%02d:%02d %ld\n", t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, tv->tv_sec); } #elif defined(ARCH_ESP32) diff --git a/variants/m5stack_coreink/platformio.ini b/variants/m5stack_coreink/platformio.ini index 9b41675e4..2a0eda96e 100644 --- a/variants/m5stack_coreink/platformio.ini +++ b/variants/m5stack_coreink/platformio.ini @@ -12,7 +12,7 @@ build_flags = lib_deps = ${esp32_base.lib_deps} zinggjm/GxEPD2@^1.4.9 - lewisxhe/PCF8563_Library@^0.0.1 + https://github.com/lewisxhe/PCF8563_Library.git#91399f254651537c5ab338dacc7c10d1f087fd09 board_build.f_cpu = 240000000L upload_protocol = esptool upload_port = /dev/ttyACM* diff --git a/variants/t-echo/platformio.ini b/variants/t-echo/platformio.ini index 42b03b688..cefb8f342 100644 --- a/variants/t-echo/platformio.ini +++ b/variants/t-echo/platformio.ini @@ -14,5 +14,5 @@ lib_deps = ${nrf52840_base.lib_deps} https://github.com/meshtastic/GxEPD2#afce87a97dda1ac31d8a28dc8fa7c6f55dc96a61 adafruit/Adafruit BusIO@^1.13.2 - lewisxhe/PCF8563_Library@^0.0.1 + https://github.com/lewisxhe/PCF8563_Library.git#91399f254651537c5ab338dacc7c10d1f087fd09 ;upload_protocol = fs