Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: update tzdata to 2023b #47248

Closed
wants to merge 1 commit into from

Conversation

tibrewalricha
Copy link

@tibrewalricha tibrewalricha commented Mar 24, 2023

Based on the instructions in https://github.com/nodejs/node/tree/main/tools/icu, I updated the time zone database separately from the rest of the ICU data. This PR updates tzdata to 2023b.

@nodejs-github-bot nodejs-github-bot added dependencies Pull requests that update a dependency file. needs-ci PRs that need a full CI run. labels Mar 24, 2023
@Trott
Copy link
Member

Trott commented Mar 26, 2023

I welcome the change but I'm not sure how to review it to confirm that the submitted file is the correct one. Maybe I can update locally and do a diff? Is there a better approach? @srl295 @nodejs/i18n

@albertyw
Copy link
Contributor

albertyw commented Mar 26, 2023

Following the same process and diffing the resulting file is probably the "correct" way but I think in past releases of ICU tooling, has resulted in false positives due to differences between releases and Mac/Linux versions.

There are tests in node that the data here is valid so if you can validate by running GitHub Actions. Otherwise, I, as a slightly less random internet stranger (I contributed tzdata PRs previously to this repo) can vouch that I worked with @tibrewalricha to write this PR.

Lastly, it wasn't noted in Richa's pull request but this is a fairly urgent update. Tzdata 2023b contains updates for Lebanon's daylight savings time, which was announced Thursday and takes effect this weekend. Until this PR is merged and released, the Intl stdlib will be converting timezones for Lebanon incorrectly.

Ref: http://mm.icann.org/pipermail/tz-announce/2023-March/000078.html

@srl295
Copy link
Member

srl295 commented Mar 27, 2023

I welcome the change but I'm not sure how to review it to confirm that the submitted file is the correct one. Maybe I can update locally and do a diff? Is there a better approach? @srl295 @nodejs/i18n

There's not a great way to diff.

# uncompress
$ bunzip2 icudt72l.dat.bz2
# list contents
$ icupkg -l icudt72l.dat  | tee list.txt
# extract
$ icupkg icudt72l.dat -x list.txt

then compare two such unpackings:

$ diff -r A B
Binary files A/windowsZones.res and B/windowsZones.res differ
Binary files A/zoneinfo64.res and B/zoneinfo64.res differ

now we can look at those speific files:

$ derb -i $(pwd) windowsZones.res
$ derb -i $(pwd) zoneinfo64.res

derb will decompile the .res files, now they can be diffed:

diff -r A/windowsZones.txt B/windowsZones.txt
164c164
<             MX { "America/Matamoros" }
---
>             MX { "America/Matamoros America/Ojinaga" }
170c170
<             MX { "America/Mexico_City America/Bahia_Banderas America/Merida America/Monterrey" }
---
>             MX { "America/Mexico_City America/Bahia_Banderas America/Merida America/Monterrey America/Chihuahua " }
380c380
<             MX { "America/Ojinaga" }
---
>             MX { "America/Ciudad_Juarez" }
385,386c385,386
<             001 { "America/Chihuahua" }
<             MX { "America/Chihuahua America/Mazatlan" }
---
>             001 { "America/Mazatlan" }
>             MX { "America/Mazatlan" }
diff -r A/zoneinfo64.txt B/zoneinfo64.txt
1298a1299
>         Egypt:intvector { 3, 4294967266, 4294967290, 0, 0, 9, 4294967265, 4294967291, 86400, 0, 3600 }
1312c1313
<     TZVersion { "2022g" }
---
>     TZVersion { "2023b" }
1346a1348,1350
>             finalRaw:int { 7200 }
>             finalRule { "Egypt" }
>             finalYear:int { 2024 }
1348c1352
<             trans:intvector { 3365123296, 3371858896, 3388796896, 3402098896, 3419123296, 3437177296, 3450659296, 3469145296, 3482281696, 3500767696, 3515113696, 3532303696, 3895878496, 3908316496, 3926636896, 3939852496, 3958176496, 3971312896, 3989798896, 4002935296, 4021334896, 4034471296, 4052870896, 4066007296, 4084406896, 4097543296, 4116029296, 4129165696, 4147565296, 4160701696, 4179101296, 4192324096, 4210637296, 4223860096, 4242259696, 4255482496, 4273795696, 4287018496, 10364400, 23587200, 41900400, 55123200, 73522800, 86745600, 105058800, 118281600, 136594800, 149817600, 168130800, 181353600, 199753200, 212976000, 231289200, 244512000, 262825200, 276048000, 294361200, 307584000, 325983600, 339206400, 357519600, 370742400, 396399600, 402278400, 426812400, 433814400, 452214000, 465436800, 483750000, 496972800, 515286000, 528508800, 546822000, 560044800, 578444400, 591667200, 610412400, 623203200, 641516400, 654739200, 673052400, 686275200, 704674800, 717897600, 736210800, 749433600, 767746800, 780969600, 799020000, 812322000, 830469600, 843771600, 861919200, 875221200, 893368800, 906670800, 925423200, 938725200, 956872800, 970174800, 988322400, 1001624400, 1019772000, 1033074000, 1051221600, 1064523600, 1083276000, 1096578000, 1114725600, 1128027600, 1146175200, 1158872400, 1177624800, 1189112400, 1209074400, 1219957200, 1240524000, 1250802000, 1272578400, 1281474000, 1284069600, 1285880400, 1400191200, 1403816400, 1406844000, 1411678800 }
---
>             trans:intvector { 3365123296, 3371858896, 3388796896, 3402098896, 3419123296, 3437177296, 3450659296, 3469145296, 3482281696, 3500767696, 3515113696, 3532303696, 3895878496, 3908316496, 3926636896, 3939852496, 3958176496, 3971312896, 3989798896, 4002935296, 4021334896, 4034471296, 4052870896, 4066007296, 4084406896, 4097543296, 4116029296, 4129165696, 4147565296, 4160701696, 4179101296, 4192324096, 4210637296, 4223860096, 4242259696, 4255482496, 4273795696, 4287018496, 10364400, 23587200, 41900400, 55123200, 73522800, 86745600, 105058800, 118281600, 136594800, 149817600, 168130800, 181353600, 199753200, 212976000, 231289200, 244512000, 262825200, 276048000, 294361200, 307584000, 325983600, 339206400, 357519600, 370742400, 396399600, 402278400, 426812400, 433814400, 452214000, 465436800, 483750000, 496972800, 515286000, 528508800, 546822000, 560044800, 578444400, 591667200, 610412400, 623203200, 641516400, 654739200, 673052400, 686275200, 704674800, 717897600, 736210800, 749433600, 767746800, 780969600, 799020000, 812322000, 830469600, 843771600, 861919200, 875221200, 893368800, 906670800, 925423200, 938725200, 956872800, 970174800, 988322400, 1001624400, 1019772000, 1033074000, 1051221600, 1064523600, 1083276000, 1096578000, 1114725600, 1128027600, 1146175200, 1158872400, 1177624800, 1189112400, 1209074400, 1219957200, 1240524000, 1250802000, 1272578400, 1281474000, 1284069600, 1285880400, 1400191200, 1403816400, 1406844000, 1411678800, 1682632800, 1698354000 }
1350c1354

(derb and icupkg are part of ICU. if you installed icu4c on mac, look in /usr/local/opt/icu4c/*bin/ etc.)

@Trott
Copy link
Member

Trott commented Mar 27, 2023

test/parallel/test-tz-version.js is failing. Looks like the contents of test/fixtures/tz-version.txt needs to be updated?

@merceyz
Copy link
Member

merceyz commented Mar 27, 2023

Unless I'm missing something then this has been automated and is updated in #47256.

@tibrewalricha
Copy link
Author

updated test/fixtures/tz-version.txt with the latest tzdata version (2023b).

@tibrewalricha tibrewalricha deleted the 2023b_44_le branch March 28, 2023 15:26
@tibrewalricha
Copy link
Author

Closing this PR since the 2023b updates was merged via #47256

@srl295
Copy link
Member

srl295 commented Mar 28, 2023

2023c coming soon

@tibrewalricha
Copy link
Author

Created #47288 so that tzdata versions can be updated quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants