fix(net): start SNTP with the saved timezone

configTime() sets TZ to UTC, which undid the saved rule on every join.
This commit is contained in:
2026-08-04 20:44:13 -04:00
parent b3b5a9b2a3
commit 0a620713df
+2 -2
View File
@@ -97,8 +97,8 @@ void net::loop() {
// Started per join rather than once at boot: a fresh lease may hand us a
// different NTP server, and the daemon re-syncs on its own hourly from here.
sntp_servermode_dhcp(1);
configTime(0, 0, "pool.ntp.org",
"time.nist.gov"); // UTC; the UI decides how to show it
// configTime() would overwrite TZ with UTC, so hand it the saved rule.
configTzTime(settings.timezone.c_str(), "pool.ntp.org", "time.nist.gov");
Serial.println("[net] wifi up, sntp started");
}