iamkun / dayjs

⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API
https://day.js.org
MIT License
46.85k stars 2.29k forks source link

Invalid DST for America/Santiago #2057

Open alexmichailichenko opened 2 years ago

alexmichailichenko commented 2 years ago

Describe the bug Seems like dayjs doesn't take into account that Chile's 2022 DST start is delayed from September 2 to September 11 (Internal Affairs Ministry of Chile informed the DST for America/Santiago to start at midnight on September 11 due to the vote on the new Constitution). America:Santiago

Expected behavior Should return a string with the time 09:00, but returns 2022-09-10T10:00:00-03:00 for 2022-09-10T13:00:00.000Z

Information

Bykiev commented 2 years ago

I'm not 100% sure, but it seems dayjs is using Intl. Intl in browsers relys on system time. Can you please check if OS timezone is correct?

Related artile: https://www.ghacks.net/2022/09/07/windows-users-in-chile-could-run-into-issues-because-of-daylight-savings-time/