nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
107.68k stars 29.64k forks source link

Update tzdata to 2022b #44333

Closed albertyw closed 2 years ago

albertyw commented 2 years ago

Version

v12 and up

Platform

All platforms

Subsystem

icu-small

What steps will reproduce the bug?

$ node
Welcome to Node.js v18.7.0.
Type ".help" for more information.
> const data = new Date(Date.UTC(2022, 8, 6, 12));
undefined
> new Intl.DateTimeFormat('en-US', {timeZone: 'Europe/Kiev'}).format(data)
'10/5/2022'

> new Intl.DateTimeFormat('en-US', {timeZone: 'Europe/Kyiv'}).format(data)
Uncaught RangeError: Invalid time zone specified: Europe/Kyiv
    at new DateTimeFormat (<anonymous>)
# Should Resolve the same as Europe/Kiev

> new Intl.DateTimeFormat('en-US', {timeZone: 'America/Santiago', timeZoneName: ['shortOffset']}).format(data)
'9/6/2022, GMT-3'
# Should be GMT-4

How often does it reproduce? Is there a required condition?

This is reproducible on all version of node with a dependency on icu-small.

What is the expected behavior?

See changes from tzdata 2022b in http://mm.icann.org/pipermail/tz-announce/2022-August/000071.html

Note that tzdata 2022c has also been released (http://mm.icann.org/pipermail/tz-announce/2022-August/000072.html) but contains less substantive changes.

What do you see instead?

Incorrect future timezone conversions for Chile, Ukraine, and Iran.

Additional information

PR in progress.

VoltrexKeyva commented 2 years ago

Updated by https://github.com/nodejs/node/commit/f59d8d3dc3247c60b20183d56ec995064bda67da.