fix show ntp_time (as local time)

This commit is contained in:
MichaelDvP
2024-12-23 13:03:59 +01:00
parent 97925c47fd
commit 4c69c9e445
2 changed files with 8 additions and 1 deletions

View File

@@ -68,6 +68,12 @@ void WebStatusService::systemStatus(AsyncWebServerRequest * request) {
}
return 0;
}();
time_t now = time(nullptr);
if (now > 1500000000L) {
char t[25];
strftime(t, sizeof(t), "%FT%T", localtime(&now));
root["ntp_time"] = t;
}
#endif
root["ap_status"] = EMSESP::esp8266React.apStatus();