Browse Source

ws: correctly send 64bit time_t to the webui

mcspr-patch-1
Maxim Prokhorov 3 years ago
parent
commit
c100696f7b
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      code/espurna/ws.cpp

+ 2
- 1
code/espurna/ws.cpp View File

@ -44,9 +44,10 @@ void _wsUpdate(JsonObject& root) {
root["vcc"] = "N/A (TOUT) ";
}
#if NTP_SUPPORT
// XXX: arduinojson will ignore info.now assignment (64bit time_t) when trying to store it as integer
if (ntpSynced()) {
auto info = ntpInfo();
root["now"] = info.now;
root["now"] = static_cast<double>(info.now);
root["nowString"] = info.utc;
root["nowLocalString"] = info.local.length()
? info.local


Loading…
Cancel
Save