ntp status and time button

This commit is contained in:
MichaelDvP
2022-04-04 11:12:18 +02:00
parent 26758b965d
commit 462bf81be1
4 changed files with 12 additions and 6 deletions

View File

@@ -36,7 +36,7 @@ void NTPStatus::ntpStatus(AsyncWebServerRequest * request) {
time_t now = time(nullptr);
// only provide enabled/disabled status for now
root["status"] = sntp_enabled() && emsesp::EMSESP::system_.ntp_connected() ? 1 : 0;
root["status"] = sntp_enabled() ? emsesp::EMSESP::system_.ntp_connected() ? 2 : 1 : 0;
// the current time in UTC
root["utc_time"] = toUTCTimeString(gmtime(&now));