From 536a8b26dd3f3de2679c2d366f92569b3d569091 Mon Sep 17 00:00:00 2001 From: geronet1 Date: Mon, 27 Jan 2025 23:29:06 +0100 Subject: [PATCH] timezone setting included --- src/app.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app.cpp b/src/app.cpp index 7c6a8aef..c253fc83 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -218,6 +218,10 @@ void app::onNtpUpdate(uint32_t utcTimestamp) { mTimestamp = utcTimestamp; DPRINTLN(DBG_INFO, "[NTP]: " + ah::getDateTimeStr(mTimestamp) + " UTC"); + CEST.offset = mConfig->sys.timezone * 60 + 1; + CET.offset = mConfig->sys.timezone * 60; + gTimezone.setRules(CEST, CET); + uint32_t localTime = gTimezone.toLocal(mTimestamp); uint32_t midTrig = gTimezone.toUTC(localTime - (localTime % 86400) + 86400); // next midnight local time resetTickerByName("midNi");