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.59k stars 2.28k forks source link

Timezone DB Bug #2121

Open azampagl opened 1 year ago

azampagl commented 1 year ago

Describe the bug I'm not sure if this is a day.js bug or a native browser Internationalization API bug, but the time zone database seems to be out of date.

For example, if you apply the following timezone in day.js

dayjs.tz('2022-11-08 13:00:00', 'America/Ojinaga')

You will get an offset of UTC -7.

Expected behavior

The offset should be UTC -6.

https://timezonedb.com/time-zones/America/Ojinaga

(They city of Ciudad Juárez, Mexico recently changed this)

If day.js is not the proper place to report this bug, do you know where to file a bug report for the Internationalization API?

Information

jacsamg commented 1 year ago

I am also experiencing problems with it. Thanks for creating an entry for this.

My temporary solution is to use dayjs().utcOffset(-6)

BePo65 commented 1 year ago

This is not a dayjs issue, but a Intl issue and should be fixed there (wherever this may be :-).

BePo65 commented 1 year ago

Duplicate of issue #2107 ?

jsanchez-innomius commented 1 year ago

I think Intl is where the problem exists, they supposedly use IANA database and this appears to be updated (https://time.is)