diff --git a/src/XD0OTA.cpp b/src/XD0OTA.cpp index c105696..a23d623 100644 --- a/src/XD0OTA.cpp +++ b/src/XD0OTA.cpp @@ -105,19 +105,19 @@ int XD0OTA::checkForUpdates() { } void XD0OTA::setClock() { - configTime(0, 0, "pool.ntp.org", "time.nist.gov"); // UTC - DEBUG_MSG(F("Waiting for NTP time sync: ")); + configTime(MY_TZ, "pool.ntp.org"); + DEBUG_MSG("Waiting for NTP time sync: "); time_t now = time(nullptr); while (now < 8 * 3600 * 2) { yield(); delay(500); - DEBUG_MSG(F(".")); + DEBUG_MSG("."); now = time(nullptr); } - DEBUG_MSG(F("")); + DEBUG_MSG(""); struct tm timeinfo; gmtime_r(&now, &timeinfo); - DEBUG_MSG(F("Current time: ")); + DEBUG_MSG("Current time: "); Serial.print(asctime(&timeinfo)); } diff --git a/src/XD0OTA.h b/src/XD0OTA.h index 97a4cdd..25fd2e4 100644 --- a/src/XD0OTA.h +++ b/src/XD0OTA.h @@ -8,6 +8,8 @@ #include +#define MY_TZ "CET-1CEST,M3.5.0,M10.5.0/3" // https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv + //const int FW_VERSION = 13; // see main.h class XD0OTA {