From ee0a22a8ae307506b374a4100bd7bf03cfcfad9d Mon Sep 17 00:00:00 2001 From: Aaron Griffith Date: Wed, 14 Dec 2022 05:32:54 -0500 Subject: [PATCH] initialize tm_isdst in System::rtcGetEpoch() --- src/include/System.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/include/System.cpp b/src/include/System.cpp index e6529526..5d2612ba 100644 --- a/src/include/System.cpp +++ b/src/include/System.cpp @@ -288,6 +288,7 @@ uint32_t System::rtcGetEpoch() _t.tm_wday = rtcBcdToDec(Wire.read() & 0x07); _t.tm_mon = rtcBcdToDec(Wire.read() & 0x1F) - 1; _t.tm_year = rtcBcdToDec(Wire.read()) + 2000 - 1900; + _t.tm_isdst = -1; // we don't know dst state, so attempt to guess Wire.endTransmission(); return (uint32_t)(mktime(&_t));