spencermountain / spacetime

A lightweight javascript timezone library
http://spacetime.how/
Other
3.97k stars 184 forks source link

Daylight savings error with timezone #402

Open jstelnik opened 8 months ago

jstelnik commented 8 months ago

The ends (and possibly beginnings) of daylight savings are not set properly as seen in the picture below. The current offset of 11-05-2025 should be -5. See the daylight savings changes for 2025 at the link below.

https://www.timeanddate.com/time/change/usa?year=2025#:~:text=Mar%209%2C%202025%20%2D%20Daylight%20Saving%20Time%20Starts&text=Sunrise%20and%20sunset%20will%20be,Time%2C%20and%20Daylight%20Savings%20Time.

Screenshot 2023-11-05 at 2 33 11 PM
spencermountain commented 8 months ago

Hey Jamie, sorry about that. spacetime doesn’t currently store dst changes for past or future years, to reduce file-size. This sucks, and is something i obviously want to improve on. The good news is that the problem is limited to one hour, for the day next to a dst change. Writing patterns for things like ‘2nd sunday in November’ is something I’ve been working on to address this, just hasn’t happened yet. Cheers

On Sun, Nov 5, 2023 at 2:38 PM Jamie Stelnik @.***> wrote:

The ends (and possibly beginnings) of daylight savings are not set properly as seen in the picture below. The current offset of 11-05-2025 should be -5. See the daylight savings changes for 2025 at the link below.

https://www.timeanddate.com/time/change/usa?year=2025#:~:text=Mar%209%2C%202025%20%2D%20Daylight%20Saving%20Time%20Starts&text=Sunrise%20and%20sunset%20will%20be,Time%2C%20and%20Daylight%20Savings%20Time . [image: Screenshot 2023-11-05 at 2 33 11 PM] https://user-images.githubusercontent.com/87584454/280550285-bd7cdd9d-f4c8-4b34-a619-d783ca0983ac.png

— Reply to this email directly, view it on GitHub https://github.com/spencermountain/spacetime/issues/402, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADBSKI2ZCD2JORGITHLR7TYC7MJHAVCNFSM6AAAAAA66RPF6CVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3TOOJTGA4TKNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>