|
@ -27,6 +27,7 @@ void _ntpWebSocketOnSend(JsonObject& root) { |
|
|
root["ntpServer"] = getSetting("ntpServer", NTP_SERVER); |
|
|
root["ntpServer"] = getSetting("ntpServer", NTP_SERVER); |
|
|
root["ntpOffset"] = getSetting("ntpOffset", NTP_TIME_OFFSET).toInt(); |
|
|
root["ntpOffset"] = getSetting("ntpOffset", NTP_TIME_OFFSET).toInt(); |
|
|
root["ntpDST"] = getSetting("ntpDST", NTP_DAY_LIGHT).toInt() == 1; |
|
|
root["ntpDST"] = getSetting("ntpDST", NTP_DAY_LIGHT).toInt() == 1; |
|
|
|
|
|
root["ntpRegion"] = getSetting("ntpRegion", NTP_DST_REGION).toInt(); |
|
|
if (ntpSynced()) root["now"] = now(); |
|
|
if (ntpSynced()) root["now"] = now(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -66,6 +67,9 @@ void _ntpConfigure() { |
|
|
NTP.setNtpServerName(server); |
|
|
NTP.setNtpServerName(server); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
uint8_t dst_region = getSetting("ntpRegion", NTP_DST_REGION).toInt(); |
|
|
|
|
|
NTP.setDSTZone(dst_region); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void _ntpUpdate() { |
|
|
void _ntpUpdate() { |
|
|