Ackee icon indicating copy to clipboard operation
Ackee copied to clipboard

Unrecognized time zone identifier: "Europe/Kyiv"

Open cawa-93 opened this issue 2 years ago • 6 comments

🐞 Describe the bug

On live demo I got this error:

unrecognized time zone identifier: "Europe/Kyiv"

📚 To Reproduce

  1. Open demo
  2. Try to Sign in

💡 Expected behavior

Just normaly work

🖼️ Screenshots

зображення

⚙️ Environment Live demo from README 🤷‍♂️ Browser: Firefox Developer edition v105.0b9

📋 Additional context

In my opinion it may be related to recently renaming timezone Europe/Kiev to Europe/Kyiv

https://mm.icann.org/pipermail/tz-announce/2022-August/000071.html

cawa-93 avatar Sep 19 '22 19:09 cawa-93

Thanks for letting me know!

In my opinion it may be related to recently renaming timezone Europe/Kiev to Europe/Kyiv

I think that's the problem. I'm using date-fns-tz to work with timezones. A new version of the package might already support Europe/Kiev. A PR is welcome!

electerious avatar Sep 20 '22 08:09 electerious

Regarding to https://github.com/marnusw/date-fns-tz/issues/120#issuecomment-828365540 it may be caused by mismatched nodejs timezones and browser timezones.

In firefox v105.0b9:

> Intl.DateTimeFormat().resolvedOptions().timeZone 
< 'Europe/Kyiv'

In edge v105.0.1343.42:

> Intl.DateTimeFormat().resolvedOptions().timeZone 
< 'Europe/Kiev'

But in node v18.8.0

> new Intl.DateTimeFormat('en-US', {timeZone: 'Europe/Kyiv'}).format(Date.now())
Uncaught RangeError: Invalid time zone specified: Europe/Kyiv
    at new DateTimeFormat (<anonymous>)
> new Intl.DateTimeFormat('en-US', {timeZone: 'Europe/Kiev'}).format(Date.now())
'9/20/2022'

Node already updated https://github.com/nodejs/node/issues/44333

cawa-93 avatar Sep 20 '22 08:09 cawa-93

Confirm. In node 18.9.0 both timezone works.

> new Intl.DateTimeFormat('en-US', {timeZone: 'Europe/Kyiv'}).format(Date.now())
'9/20/2022'
> new Intl.DateTimeFormat('en-US', {timeZone: 'Europe/Kiev'}).format(Date.now())
'9/20/2022'

Therefore, I assume that updating the node on the demo server should solve this problem

cawa-93 avatar Sep 20 '22 08:09 cawa-93

I've updated date-fns-tz with Ackee 3.4.2. Can you check if the bug has been fixed?

electerious avatar Dec 17 '22 16:12 electerious

Yeap. Still not working in firefox 109.0b3 on windows 10

cawa-93 avatar Dec 17 '22 16:12 cawa-93

This is still an issue

mks-h avatar Sep 19 '23 20:09 mks-h