mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
fix show ntp_time (as local time)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user