gmag11 / ESPNtpClient

High accuracy NTP library for ESP32 and ESP8266
MIT License
118 stars 25 forks source link

Daylight Saving Time #15

Closed dranem50260 closed 3 years ago

dranem50260 commented 3 years ago

Thanks for this excellent library; the best I found so far. My question is : is Daylight Saving Time supported by the library ?

gmag11 commented 3 years ago

Target of this library is sync time using NTP. NTP server time is always UTC, that does not have any daylight saving change.

After synchronization, UDP time is passed to time management subsystem on ESP8266/ESP32, that takes responsibility to manage local time including daylight savings.

So, the first answer to your question is: No. This library does not manage daylight saving because it works internally using UTC.

But, you will get full local time and daylight saving functionality because internal functions allow so:

Effectively, YES. You will be able to get time with daylight saving shift correction.