ropg / ezTime

ezTime — pronounced "Easy Time" — is a very easy to use Arduino time and date library that provides NTP network time lookups, extensive timezone support, formatted time and date strings, user events, millisecond precision and more.
MIT License
327 stars 92 forks source link

Wrong begin date of DST #31

Closed wayfarerbasta closed 5 years ago

wayfarerbasta commented 5 years ago

Hello, I use the library without a network connection. Therfore I defined the POSIX TZ rule like this:

#define CET_POSIX   "CET-1CEST,M3.5.0/02:00:00,M10.5.0/03:00:00"        // Time in Berlin
LOC.setPosix(CET_POSIX);

The last Sunday in March this year will be the 31st. Unfortunatly the DST begin date seems to be already on 24th of March. This could be a similar problem with the POSIX day number like #28

wayfarerbasta commented 5 years ago

In addition to that I figured out that the DST starting time is not at 2:00 as defined in the rule. The DST starts at 3:00, and it seams that the rule applies to UTC instead of CET.

ropg commented 5 years ago

I believe this is fixed by the fix for #38, my makeOrdinalTime function was off when the last of a given weekday in a given month was requested. Please reopen if problem reoccurs.