CronAlarms - NtpClient/Time
Opened this issue · 1 comments
I use the NtpClient library, which is dependent on the TimeLib library, to synchronize the time with an NTP server on an ESP8266.
I know that the ESP8266 SDK now also has an NTP mechanism. The NtpClient library has a few nice features that are missing in the SDk, so I use them.
In conjunction with the CronAlarms I have a time difference of one hour. If I get the time via the TimeLib, the time is correct.
TimeLib: 20:47:52 18.02.2021
time:.h Thu Feb 18 19:47:51 2021
Do you have an idea or tip where I have to set the time difference - possibly TimeZone - correctly?
Links
This works for Europe:
configTzTime("CET-1CEST,M3.5.0,M10.5.0/3", "pool.ntp.org"); // Timezone for CET, check TZ.h or https://www.iana.org/time-zones
Please report back if that solved your problem (or not).
I assume that you are using the appropriate POSIX functions to get the "local" time.