mirror of
https://github.com/lumapu/ahoy.git
synced 2025-04-28 17:56:21 +02:00
timezone setting included
This commit is contained in:
parent
78cbd7749d
commit
536a8b26dd
1 changed files with 4 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue