align timing with EMS-ESP

This commit is contained in:
Proddy
2023-02-26 20:59:03 +01:00
parent 4c186606bd
commit 84c90dd587
3 changed files with 42 additions and 37 deletions

View File

@@ -49,7 +49,7 @@ void NTPSettingsService::WiFiEvent(WiFiEvent_t event) {
void NTPSettingsService::configureNTP() {
emsesp::EMSESP::system_.ntp_connected(false);
if (connected_ && _state.enabled) {
emsesp::EMSESP::logger().info("Starting NTP");
emsesp::EMSESP::logger().info("Starting NTP service");
sntp_set_sync_interval(3600000); // one hour
sntp_set_time_sync_notification_cb(ntp_received);
configTzTime(_state.tzFormat.c_str(), _state.server.c_str());