Set getLocalTime timeout to 0 to prevent watchdog triggers

This happens especially when no WiFi is configured and the user enters the NTP info page
This commit is contained in:
Thomas Basler
2022-09-19 20:45:44 +02:00
parent 7dc0123140
commit 950b211fd5
2 changed files with 5 additions and 5 deletions

View File

@@ -35,7 +35,7 @@ void WebApiNtpClass::onNtpStatus(AsyncWebServerRequest* request)
root[F("ntp_timezone_descr")] = config.Ntp_TimezoneDescr;
struct tm timeinfo;
if (!getLocalTime(&timeinfo)) {
if (!getLocalTime(&timeinfo, 0)) {
root[F("ntp_status")] = false;
} else {
root[F("ntp_status")] = true;