From 040a67b048f9bb67e93a59ad4d32bc1c596a9b04 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Sun, 1 Dec 2024 00:55:12 +0000 Subject: [PATCH] Bug 1930466 - Part 1: Use zone.tab to guide time zone canonicalisation. r=dminor Implement the changes from to reduce differences in time zone canonicalisation when compared to V8 and JSC (which both use CLDR time zone data instead of IANA time zone data). Implementing the `AvailableNamedTimeZoneIdentifiers` spec operation requires to link time zone identifiers to region codes. When the time zone is listed in the "zone.tab" file, we can get the region code from "zone.tab". In all other cases we need to manually map the time zone to a matching region, because CLDR doesn't have "public" data for this [1]. This is implemented using the new file "intl/TimeZoneMapping.yaml". ICU 74 added `ucal_getIanaTimeZoneID` to get the canonical IANA time zone id. Internally `ucal_getIanaTimeZoneID` first calls `ucal_getCanonicalTimeZoneID` and then loads a resource bundle to check if there are any time zone ids which need to be replaced with other ids for compatibility with IANA data. Unfortunately the resource bundle is not cached, so calling `ucal_getIanaTimeZoneID` instead of `ucal_getIanaTimeZoneID` adds a considerable performance overhead. To avoid any performance regressions, we keep our own time zone rewriting code for the time being. Using our own code also means we don't have to add a workaround for this CLDR bug: . Also remove "Factory" from the list of supported time zone identifiers, because supporting it was always a bit questionable and latest V8 also doesn't support it anymore, so we shouldn't run into web-compat issues. Remove the old generated tests and add "timeZone_links.js" to ensure time zone links are correctly resolved. [1] Neither of these two files look like "public" data to me: - https://github.com/unicode-org/cldr/blob/main/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/TZID.txt - https://github.com/unicode-org/cldr/blob/main/tools/cldr-code/src/main/resources/org/unicode/cldr/icu/idList.txt Differential Revision: https://phabricator.services.mozilla.com/D228584 UltraBlame original commit: 880f2288640c43653f56bc919e9d16434426bf84 --- .../test/browser/browser_timezone.js | 36 +- js/src/builtin/intl/TimeZoneDataGenerated.h | 895 ++-- js/src/builtin/intl/TimeZoneMapping.yaml | 700 +++ js/src/builtin/intl/make_intl_data.py | 3793 ++++++++--------- .../tests/resist-fingerprinting/timezone.js | 4 +- .../Intl/DateTimeFormat/timeZone_backzone.js | 1631 ------- .../DateTimeFormat/timeZone_backzone_links.js | 390 -- ...ne_backward_links.js => timeZone_links.js} | 411 +- .../timeZone_notbackward_links.js | 211 - .../DateTimeFormat/tz-environment-variable.js | 28 + .../supportedValuesOf-timeZones-canonical.js | 215 +- 11 files changed, 3185 insertions(+), 5129 deletions(-) create mode 100644 js/src/builtin/intl/TimeZoneMapping.yaml delete mode 100644 js/src/tests/non262/Intl/DateTimeFormat/timeZone_backzone.js delete mode 100644 js/src/tests/non262/Intl/DateTimeFormat/timeZone_backzone_links.js rename js/src/tests/non262/Intl/DateTimeFormat/{timeZone_backward_links.js => timeZone_links.js} (83%) delete mode 100644 js/src/tests/non262/Intl/DateTimeFormat/timeZone_notbackward_links.js diff --git a/browser/components/resistfingerprinting/test/browser/browser_timezone.js b/browser/components/resistfingerprinting/test/browser/browser_timezone.js index 4b8e19baa8e9b..1f6889d8c4071 100644 --- a/browser/components/resistfingerprinting/test/browser/browser_timezone.js +++ b/browser/components/resistfingerprinting/test/browser/browser_timezone.js @@ -74,7 +74,9 @@ getJSTestingFunctions setTimeZone ( " -PST8PDT +America +/ +Los_Angeles " ) ; @@ -97,7 +99,9 @@ resolvedOptions . timeZone " -PST8PDT +America +/ +Los_Angeles " " Default @@ -836,7 +840,9 @@ getJSTestingFunctions setTimeZone ( " -PST8PDT +America +/ +Los_Angeles " ) ; @@ -859,7 +865,9 @@ resolvedOptions . timeZone " -PST8PDT +America +/ +Los_Angeles " " Default @@ -935,7 +943,9 @@ resolvedOptions . timeZone " -PST8PDT +America +/ +Los_Angeles " " Content @@ -1167,7 +1177,9 @@ getJSTestingFunctions setTimeZone ( " -PST8PDT +America +/ +Los_Angeles " ) ; @@ -1190,7 +1202,9 @@ resolvedOptions . timeZone " -PST8PDT +America +/ +Los_Angeles " " Default @@ -1242,7 +1256,9 @@ resolvedOptions . timeZone " -PST8PDT +America +/ +Los_Angeles " " Timezone @@ -1303,7 +1319,9 @@ resolvedOptions . timeZone " -PST8PDT +America +/ +Los_Angeles " " Timezone diff --git a/js/src/builtin/intl/TimeZoneDataGenerated.h b/js/src/builtin/intl/TimeZoneDataGenerated.h index 772e60a76e6d8..3d99c10174254 100644 --- a/js/src/builtin/intl/TimeZoneDataGenerated.h +++ b/js/src/builtin/intl/TimeZoneDataGenerated.h @@ -67,20 +67,7 @@ Africa / Asmera [ -backzone -] -" -Africa -/ -Timbuktu -" -/ -/ -Africa -/ -Bamako -[ -backzone +backward ] " America @@ -117,21 +104,6 @@ America / Argentina / -ComodRivadavia -" -/ -/ -America -/ -Catamarca -[ -backzone -] -" -America -/ -Argentina -/ Cordoba " / @@ -183,20 +155,7 @@ America / Coral_Harbour [ -backzone -] -" -America -/ -Ensenada -" -/ -/ -America -/ -Tijuana -[ -backzone +backward ] " America @@ -231,32 +190,6 @@ northamerica " America / -Montreal -" -/ -/ -America -/ -Toronto -[ -backzone -] -" -America -/ -Nipigon -" -/ -/ -America -/ -Toronto -[ -backzone -] -" -America -/ Nuuk " / @@ -268,97 +201,6 @@ Godthab europe ] " -America -/ -Pangnirtung -" -/ -/ -America -/ -Iqaluit -[ -backzone -] -" -America -/ -Rainy_River -" -/ -/ -America -/ -Winnipeg -[ -backzone -] -" -America -/ -Rosario -" -/ -/ -America -/ -Cordoba -[ -backzone -] -" -America -/ -Thunder_Bay -" -/ -/ -America -/ -Toronto -[ -backzone -] -" -America -/ -Yellowknife -" -/ -/ -America -/ -Edmonton -[ -backzone -] -" -Asia -/ -Chongqing -" -/ -/ -Asia -/ -Shanghai -[ -backzone -] -" -Asia -/ -Harbin -" -/ -/ -Asia -/ -Shanghai -[ -backzone -] -" Asia / Ho_Chi_Minh @@ -374,19 +216,6 @@ asia " Asia / -Kashgar -" -/ -/ -Asia -/ -Urumqi -[ -backzone -] -" -Asia -/ Kathmandu " / @@ -413,19 +242,6 @@ asia " Asia / -Tel_Aviv -" -/ -/ -Asia -/ -Jerusalem -[ -backzone -] -" -Asia -/ Yangon " / @@ -450,100 +266,6 @@ Faeroe europe ] " -Atlantic -/ -Jan_Mayen -" -/ -/ -Arctic -/ -Longyearbyen -[ -backzone -] -" -Australia -/ -Currie -" -/ -/ -Australia -/ -Hobart -[ -backzone -] -" -CET -" -/ -/ -Europe -/ -Brussels -[ -backzone -] -" -CST6CDT -" -/ -/ -America -/ -Chicago -[ -backzone -] -" -EET -" -/ -/ -Europe -/ -Athens -[ -backzone -] -" -EST -" -/ -/ -America -/ -Panama -[ -backzone -] -" -EST5EDT -" -/ -/ -America -/ -New_York -[ -backzone -] -" -Europe -/ -Belfast -" -/ -/ -Europe -/ -London -[ -backzone -] -" Europe / Kyiv @@ -557,111 +279,6 @@ Kiev europe ] " -Europe -/ -Tiraspol -" -/ -/ -Europe -/ -Chisinau -[ -backzone -] -" -Europe -/ -Uzhgorod -" -/ -/ -Europe -/ -Kiev -[ -backzone -] -" -Europe -/ -Zaporozhye -" -/ -/ -Europe -/ -Kiev -[ -backzone -] -" -Factory -" -/ -/ -Etc -/ -Unknown -[ -factory -] -" -HST -" -/ -/ -Pacific -/ -Honolulu -[ -backzone -] -" -MET -" -/ -/ -Europe -/ -Brussels -[ -backzone -] -" -MST -" -/ -/ -America -/ -Phoenix -[ -backzone -] -" -MST7MDT -" -/ -/ -America -/ -Denver -[ -backzone -] -" -PST8PDT -" -/ -/ -America -/ -Los_Angeles -[ -backzone -] -" Pacific / Chuuk @@ -672,20 +289,7 @@ Pacific / Truk [ -backzone -] -" -Pacific -/ -Johnston -" -/ -/ -Pacific -/ -Honolulu -[ -backzone +backward ] " Pacific @@ -711,18 +315,18 @@ Pacific / Ponape [ -backzone +backward ] " -WET +UTC " / / -Europe +Etc / -Lisbon +UTC [ -backzone +backward ] } ; @@ -796,6 +400,30 @@ backward " America / +Argentina +/ +ComodRivadavia +" +" +America +/ +Argentina +/ +Catamarca +" +} +/ +/ +America +/ +Catamarca +[ +backward +] +{ +" +America +/ Buenos_Aires " " @@ -840,6 +468,26 @@ backward " America / +Coral_Harbour +" +" +America +/ +Atikokan +" +} +/ +/ +America +/ +Coral_Harbour +[ +backward +] +{ +" +America +/ Cordoba " " @@ -889,14 +537,102 @@ Godthab " America / -Nuuk +Nuuk +" +} +/ +/ +America +/ +Godthab +[ +backward +] +{ +" +America +/ +Indianapolis +" +" +America +/ +Indiana +/ +Indianapolis +" +} +/ +/ +America +/ +Indianapolis +[ +backward +] +{ +" +America +/ +Jujuy +" +" +America +/ +Argentina +/ +Jujuy +" +} +/ +/ +America +/ +Jujuy +[ +backward +] +{ +" +America +/ +Louisville +" +" +America +/ +Kentucky +/ +Louisville +" +} +/ +/ +America +/ +Louisville +[ +backward +] +{ +" +America +/ +Mendoza +" +" +America +/ +Argentina +/ +Mendoza " } / / America / -Godthab +Mendoza [ backward ] @@ -904,327 +640,307 @@ backward " America / -Indianapolis +Rosario " " America / -Indiana +Argentina / -Indianapolis +Cordoba " } / / America / -Indianapolis +Cordoba [ backward ] { " -America +Antarctica / -Jujuy +South_Pole " " -America -/ -Argentina +Antarctica / -Jujuy +McMurdo " } / / -America +Pacific / -Jujuy +Auckland [ backward ] { " -America +Asia / -Kralendijk +Calcutta " " -America +Asia / -Curacao +Kolkata " } / / -America +Asia / -Kralendijk +Calcutta [ backward ] { " -America +Asia / -Louisville +Katmandu " " -America -/ -Kentucky +Asia / -Louisville +Kathmandu " } / / -America +Asia / -Louisville +Katmandu [ backward ] { " -America +Asia / -Lower_Princes +Rangoon " " -America +Asia / -Curacao +Yangon " } / / -America +Asia / -Lower_Princes +Rangoon [ backward ] { " -America +Asia / -Marigot +Saigon " " -America +Asia / -Port_of_Spain +Ho_Chi_Minh " } / / -America +Asia / -Marigot +Saigon [ backward ] { " -America +Atlantic / -Mendoza +Faeroe " " -America -/ -Argentina +Atlantic / -Mendoza +Faroe " } / / -America +Atlantic / -Mendoza +Faeroe [ backward ] { " -America +Etc / -St_Barthelemy +GMT " " -America -/ -Port_of_Spain +UTC " } / / -America +Etc / -St_Barthelemy +GMT [ -backward +etcetera ] { " -Antarctica +Etc / -South_Pole +GMT ++ +0 " " -Antarctica -/ -McMurdo +UTC " } / / -Pacific +Etc / -Auckland +GMT [ backward ] { " -Arctic +Etc / -Longyearbyen +GMT +- +0 " " -Europe -/ -Oslo +UTC " } / / -Arctic +Etc / -Longyearbyen +GMT [ backward ] { " -Asia +Etc / -Calcutta +GMT0 " " -Asia -/ -Kolkata +UTC " } / / -Asia +Etc / -Calcutta +GMT [ backward ] { " -Asia +Etc / -Chungking +Greenwich " " -Asia -/ -Chongqing +UTC " } / / -Asia +Etc / -Shanghai +GMT [ backward ] { " -Asia +Etc / -Katmandu +UCT " " -Asia -/ -Kathmandu +UTC " } / / -Asia +Etc / -Katmandu +UTC [ backward ] { " -Asia +Etc / -Rangoon +UTC " " -Asia -/ -Yangon +UTC " } / / -Asia +Etc / -Rangoon +UTC [ -backward +etcetera ] { " -Asia +Etc / -Saigon +Universal " " -Asia -/ -Ho_Chi_Minh +UTC " } / / -Asia +Etc / -Saigon +UTC [ backward ] { " -Atlantic +Etc / -Faeroe +Zulu " " -Atlantic -/ -Faroe +UTC " } / / -Atlantic +Etc / -Faeroe +UTC [ backward ] @@ -1232,19 +948,19 @@ backward " Europe / -Bratislava +Kiev " " Europe / -Prague +Kyiv " } / / Europe / -Bratislava +Kiev [ backward ] @@ -1252,19 +968,19 @@ backward " Europe / -Busingen +Uzhgorod " " Europe / -Zurich +Kyiv " } / / Europe / -Busingen +Kiev [ backward ] @@ -1272,7 +988,7 @@ backward " Europe / -Kiev +Zaporozhye " " Europe @@ -1290,81 +1006,105 @@ backward ] { " -Europe -/ -Mariehamn +GMT " " -Europe +UTC +" +} +/ +/ +Etc / -Helsinki +GMT +[ +etcetera +] +{ +" +GMT ++ +0 +" +" +UTC " } / / -Europe +Etc / -Mariehamn +GMT [ backward ] { " -Europe -/ -Podgorica +GMT +- +0 " " -Europe -/ -Belgrade +UTC " } / / -Europe +Etc / -Podgorica +GMT [ backward ] { " -Europe -/ -San_Marino +GMT0 " " -Europe +UTC +" +} +/ +/ +Etc / -Rome +GMT +[ +backward +] +{ +" +Greenwich +" +" +UTC " } / / -Europe +Etc / -San_Marino +GMT [ backward ] { " -Europe +Pacific / -Vatican +Enderbury " " -Europe +Pacific / -Rome +Kanton " } / / -Europe +Pacific / -Vatican +Enderbury [ backward ] @@ -1430,6 +1170,22 @@ backward ] { " +UCT +" +" +UTC +" +} +/ +/ +Etc +/ +UTC +[ +backward +] +{ +" US / East @@ -1452,6 +1208,38 @@ Indianapolis [ backward ] +{ +" +Universal +" +" +UTC +" +} +/ +/ +Etc +/ +UTC +[ +backward +] +{ +" +Zulu +" +" +UTC +" +} +/ +/ +Etc +/ +UTC +[ +backward +] } ; / @@ -1611,6 +1399,9 @@ New VST " " +Factory +" +" SystemV / AST4 diff --git a/js/src/builtin/intl/TimeZoneMapping.yaml b/js/src/builtin/intl/TimeZoneMapping.yaml new file mode 100644 index 0000000000000..73c11492ca376 --- /dev/null +++ b/js/src/builtin/intl/TimeZoneMapping.yaml @@ -0,0 +1,700 @@ +# +This +Source +Code +Form +is +subject +to +the +terms +of +the +Mozilla +Public +# +License +v +. +2 +. +0 +. +If +a +copy +of +the +MPL +was +not +distributed +with +this +# +file +You +can +obtain +one +at +http +: +/ +/ +mozilla +. +org +/ +MPL +/ +2 +. +0 +/ +. +# +Provide +mapping +from +time +zone +identifiers +to +region +codes +for +time +zones +# +which +aren +' +t +listed +in +tzdata +' +s +zone +. +tab +file +. +Africa +/ +Timbuktu +: +ML +Africa +/ +Asmera +: +ER +America +/ +Argentina +/ +ComodRivadavia +: +AR +America +/ +Atka +: +US +America +/ +Buenos_Aires +: +AR +America +/ +Catamarca +: +AR +America +/ +Coral_Harbour +: +CA +America +/ +Cordoba +: +AR +America +/ +Ensenada +: +MX +America +/ +Fort_Wayne +: +US +America +/ +Godthab +: +GL +America +/ +Indianapolis +: +US +America +/ +Jujuy +: +AR +America +/ +Knox_IN +: +US +America +/ +Louisville +: +US +America +/ +Mendoza +: +AR +America +/ +Montreal +: +CA +America +/ +Nipigon +: +CA +America +/ +Pangnirtung +: +CA +America +/ +Porto_Acre +: +BR +America +/ +Rainy_River +: +CA +America +/ +Rosario +: +AR +America +/ +Santa_Isabel +: +MX +America +/ +Shiprock +: +US +America +/ +Thunder_Bay +: +CA +America +/ +Virgin +: +VI +America +/ +Yellowknife +: +CA +Antarctica +/ +South_Pole +: +AQ +Asia +/ +Choibalsan +: +MN +Asia +/ +Chongqing +: +CN +Asia +/ +Harbin +: +CN +Asia +/ +Kashgar +: +CN +Asia +/ +Tel_Aviv +: +IL +Asia +/ +Ashkhabad +: +TM +Asia +/ +Calcutta +: +IN +Asia +/ +Chungking +: +CN +Asia +/ +Dacca +: +BD +Asia +/ +Istanbul +: +TR +Asia +/ +Katmandu +: +NP +Asia +/ +Macao +: +MO +Asia +/ +Rangoon +: +MM +Asia +/ +Saigon +: +VN +Asia +/ +Thimbu +: +BT +Asia +/ +Ujung_Pandang +: +ID +Asia +/ +Ulan_Bator +: +MN +Atlantic +/ +Jan_Mayen +: +SJ +Atlantic +/ +Faeroe +: +FO +Australia +/ +ACT +: +AU +Australia +/ +LHI +: +AU +Australia +/ +NSW +: +AU +Australia +/ +Canberra +: +AU +Australia +/ +Currie +: +AU +Australia +/ +North +: +AU +Australia +/ +Queensland +: +AU +Australia +/ +South +: +AU +Australia +/ +Tasmania +: +AU +Australia +/ +Victoria +: +AU +Australia +/ +West +: +AU +Australia +/ +Yancowinna +: +AU +Europe +/ +Belfast +: +GB +Europe +/ +Tiraspol +: +MD +Europe +/ +Uzhgorod +: +UA +Europe +/ +Zaporozhye +: +UA +Europe +/ +Kiev +: +UA +Europe +/ +Nicosia +: +CY +Pacific +/ +Samoa +: +AS +Pacific +/ +Enderbury +: +KI +Pacific +/ +Johnston +: +US +Pacific +/ +Yap +: +FM +Pacific +/ +Ponape +: +FM +Pacific +/ +Truk +: +FM +Brazil +/ +Acre +: +BR +Brazil +/ +DeNoronha +: +BR +Brazil +/ +East +: +BR +Brazil +/ +West +: +BR +Canada +/ +Atlantic +: +CA +Canada +/ +Central +: +CA +Canada +/ +Eastern +: +CA +Canada +/ +Mountain +: +CA +Canada +/ +Newfoundland +: +CA +Canada +/ +Pacific +: +CA +Canada +/ +Saskatchewan +: +CA +Canada +/ +Yukon +: +CA +Chile +/ +Continental +: +CL +Chile +/ +EasterIsland +: +CL +Mexico +/ +BajaNorte +: +MX +Mexico +/ +BajaSur +: +MX +Mexico +/ +General +: +MX +US +/ +Alaska +: +US +US +/ +Aleutian +: +US +US +/ +Arizona +: +US +US +/ +Central +: +US +US +/ +East +- +Indiana +: +US +US +/ +Eastern +: +US +US +/ +Hawaii +: +US +US +/ +Indiana +- +Starke +: +US +US +/ +Michigan +: +US +US +/ +Mountain +: +US +US +/ +Pacific +: +US +US +/ +Samoa +: +AS +CET +: +BE +EET +: +GR +MET +: +BE +WET +: +PT +CST6CDT +: +US +EST5EDT +: +US +EST +: +PA +HST +: +US +MST7MDT +: +US +MST +: +US +PST8PDT +: +US +Cuba +: +CU +Egypt +: +EG +Eire +: +IE +GB +: +GB +GB +- +Eire +: +GB +Hongkong +: +HK +Iceland +: +IS +Iran +: +IR +Israel +: +IL +Jamaica +: +JM +Japan +: +JP +Kwajalein +: +MH +Libya +: +LY +NZ +: +NZ +NZ +- +CHAT +: +NZ +Navajo +: +US +PRC +: +CN +Poland +: +PL +Portugal +: +PT +ROC +: +TW +ROK +: +KR +Singapore +: +SG +Turkey +: +TR +W +- +SU +: +RU diff --git a/js/src/builtin/intl/make_intl_data.py b/js/src/builtin/intl/make_intl_data.py index f52ed8d0c8d59..bec02734f51b7 100644 --- a/js/src/builtin/intl/make_intl_data.py +++ b/js/src/builtin/intl/make_intl_data.py @@ -338,8 +338,6 @@ import re import -sys -import tarfile import tempfile @@ -356,90 +354,21 @@ itertools import chain +filterfalse groupby tee +zip_longest from operator import attrgetter itemgetter -from -zipfile -import -ZipFile -import -yaml -if -sys -. -version_info -. -major -= -= -2 -: - -from -itertools -import -ifilter -as -filter - -from -itertools -import -ifilterfalse -as -filterfalse - -from -itertools -import -imap -as -map - -from -itertools -import -izip_longest -as -zip_longest - -from -urllib2 -import -Request -as -UrlRequest - -from -urllib2 -import -urlopen - -from -urlparse -import -urlsplit -else -: - -from -itertools -import -filterfalse -zip_longest - from urllib . parse import urlsplit - from urllib . @@ -448,13 +377,18 @@ Request as UrlRequest - from urllib . request import urlopen +from +zipfile +import +ZipFile +import +yaml # From https @@ -15725,6 +15659,20 @@ r " +( +# +PACKRATLIST +\ +s ++ +zone +. +tab +\ +s ++ +) +? Link \ s @@ -15762,6 +15710,7 @@ ) ? " + % ( nameSyntax @@ -15861,6 +15810,12 @@ ( ) +packrat_links += +dict +( +) + for filename in @@ -15937,17 +15892,51 @@ ] = target + +if +line +. +startswith +( +" +# +PACKRATLIST +zone +. +tab +Link +" +) +: + +( +link +target +) += +createLink +( +line +filename +) + +packrat_links +[ +link +] += +target return ( zones links +packrat_links ) def readIANATimeZones ( tzdataDir -ignoreBackzone ignoreFactory ) : @@ -15968,62 +15957,16 @@ " " -backzoneFiles +files_to_ignore = -{ +[ " backzone " -} - -( -bkfiles -tzfiles -) -= -partition -( -listIANAFiles -( -tzdataDir -) -backzoneFiles -. -__contains__ -) - -# -Read -zone -and -link -infos -. - -( -zones -links -) -= -readIANAFiles -( -tzdataDir -tzfiles -) - -( -backzones -backlinks -) -= -readIANAFiles -( -tzdataDir -bkfiles -) +] # -Remove +Ignore the placeholder time @@ -16037,64 +15980,51 @@ ignoreFactory : -zones +files_to_ignore . -remove -( -Zone +append ( " -Factory +factory " ) -) -# -Merge -with -backzone -data -. - -if -not -ignoreBackzone -: - -zones -| -= -backzones - -links +tzfiles = -{ - -name -: -target +( +file for -name -target +file in -links -. -items +listIANAFiles ( +tzdataDir ) if -name +file not in -backzones - -} - -links +files_to_ignore +) + +# +Read +zone +and +link +infos . -update + ( -backlinks +zones +links +_ +) += +readIANAFiles +( +tzdataDir +tzfiles ) validateTimeZones @@ -17415,25 +17345,78 @@ ignoreFactory : -zoneinfoZones -. -remove -( +assert Zone ( " Factory " ) -) - -# -Remove -the -ICU -placeholder -time -zone +in +zoneinfoZones + +assert +Zone +( +" +Factory +" +) +not +in +zoneinfoLinks + +assert +Zone +( +" +Factory +" +) +not +in +typesZones + +assert +Zone +( +" +Factory +" +) +in +typesLinks + +zoneinfoZones +. +remove +( +Zone +( +" +Factory +" +) +) + +del +typesLinks +[ +Zone +( +" +Factory +" +) +] + +# +Remove +the +ICU +placeholder +time +zone " Etc / @@ -17918,6 +17901,7 @@ ( zones links +_ ) = readIANAFiles @@ -18468,7 +18452,6 @@ ianaLinks icuZones icuLinks -ignoreBackzone ) : @@ -18556,76 +18539,8 @@ ) ] -# -Normally -zones -in -backzone -are -also -present -as -links -in -one -of -the -other - -# -time -zone -files -. -The -only -exception -to -this -rule -is -the -Asia -/ -Hanoi -time - -# -zone -this -zone -is -only -present -in -the -backzone -file -. - -expectedMissing -= -[ -] -if -ignoreBackzone -else -[ -Zone -( -" -Asia -/ -Hanoi -" -) -] - if missingTimeZones -! -= -expectedMissing : raise @@ -19206,324 +19121,142 @@ 0 ) ) -generatedFileWarning -= -" -/ -/ -Generated -by -make_intl_data -. -py -. -DO -NOT -EDIT -. -" -tzdataVersionComment -= -" -/ -/ -tzdata -version -= -{ -0 -} -" def -processTimeZones +readZoneTab ( - tzdataDir -icuDir -icuTzDir -version -ignoreBackzone -ignoreFactory -out ) : -" -" -" -Read -the -time -zone -info -and -create -a -new -time -zone -cpp -file -. -" -" -" +zone_country += +dict +( +) -print +zonetab_path += +tzdataDir +. +resolve ( " -Processing -tzdata -mapping -. -. +zone . +tab " ) +for +line +in +tzdataDir +. +readlines ( -ianaZones -ianaLinks +zonetab_path ) -= -readIANATimeZones +: + +if +line +. +startswith ( -tzdataDir -ignoreBackzone -ignoreFactory +" +# +" ) - +: + +continue + ( -icuZones -icuLinks +country +coords +zone +* +comments ) = -readICUTimeZones +line +. +strip ( -icuDir -icuTzDir -ignoreFactory ) - +. +split ( -legacyZones -legacyLinks +" +\ +t +" ) + +assert +zone +not +in +zone_country + +zone_country +[ +zone +] = -readICULegacyZones -( -icuDir -) +country +return +zone_country # -Remove -all -legacy -ICU -time -zones +6 . - -icuZones -= -{ -zone -for -zone -in -icuZones -if -zone -not -in -legacyZones -} - -icuLinks -= -{ - -zone -: -target -for -( -zone -target -) -in -icuLinks +5 . -items -( -) -if -zone -not -in -legacyLinks - -} - -incorrectZones -= -findIncorrectICUZones -( - -ianaZones -ianaLinks -icuZones -icuLinks -ignoreBackzone - -) - -if -not -incorrectZones -: - -print +1 +AvailableNamedTimeZoneIdentifiers ( -" -< -< -< -No -incorrect -ICU -time -zones -found -please -update -Intl -. -js -! -> -> -> -" ) - -print -( -" -< -< -< -Maybe +# +# https : / / -ssl -. -icu -- -project +tc39 . -org -/ -trac +es / -ticket +ecma402 / -12044 -was -fixed -? -> -> -> -" -) - -incorrectLinks -= -findIncorrectICULinks -( -ianaZones -ianaLinks -icuZones -icuLinks -) - -if -not -incorrectLinks -: - -print +# +sup +- +availablenamedtimezoneidentifiers +def +availableNamedTimeZoneIdentifiers ( -" -< -< -< -No -incorrect -ICU -time -zone -links -found -please -update -Intl -. -js -! -> -> -> -" +tzdataDir +ignoreFactory ) - -print -( -" -< -< -< -Maybe -https : -/ -/ -ssl + +js_src_builtin_intl_dir += +os . -icu -- -project +path . -org -/ -trac -/ -ticket -/ -12044 -was -fixed -? -> -> -> -" -) - -print +dirname ( -" -Writing -Intl -tzdata -file -. +os . +path . -" +abspath +( +__file__ +) ) with @@ -19531,12 +19264,27 @@ . open ( -out + +os +. +path +. +join +( +js_src_builtin_intl_dir +" +TimeZoneMapping +. +yaml +" +) + mode = " -w +r " + encoding = " @@ -19544,698 +19292,982 @@ - 8 " -newline -= -" -" + ) as f : -println +time_zone_mapping = -partial +yaml +. +safe_load ( -print -file -= f ) - -println + +zone_country += +readZoneTab ( -generatedFileWarning +tzdataDir ) - -println -( -tzdataVersionComment -. -format + +def +country_code_for ( -version -) +name ) +: -println -( -" -" -) +if +name +in +zone_country +: + +return +zone_country +[ +name +] -println +return +time_zone_mapping +[ +name +] + ( -" -# -ifndef -builtin_intl_TimeZoneDataGenerated_h -" +ianaZones +ianaLinks ) - -println += +readIANATimeZones ( -" -# -define -builtin_intl_TimeZoneDataGenerated_h -" +tzdataDir +ignoreFactory ) - -println + ( -" -" +backzones +backlinks +packratlinks ) - -println += +readIANAFiles ( +tzdataDir +[ " -namespace -js -{ +backzone " +] ) - -println -( -" -namespace -timezone + +all_backzone_links += { -" -) - -println +* +* +backlinks +* +* +packratlinks +} + +# +Steps +1 +- +3 +. ( -" -" +Not +applicable ) - -println + +# +Step +4 +. + +zones += +set ( -" -/ -/ -Format -: -" ) - -println + +links += +dict ( -' -/ -/ -" -ZoneName -" -/ -/ -ICU -- -Name -[ -time -zone -file -] -' ) - -println + +# +Step +5 +. ( -" -const -char -* -const -ianaZonesTreatedAsLinksByICU -[ -] -= -{ -" +Partial +only +zones ) - + for zone -icuZone in -incorrectZones +ianaZones : - -println -( -' -" -% -s -" -/ -/ -% -s -[ -% -s -] -' -% -( -zone -icuZone -zone + +# +Step +5 +. +a . -filename -) -) -println -( -" -} -; -" -) +primary += +zone -println +# +Step +5 +. +b +. ( -" -" +Not +applicable +for +zones ) -println -( +# +Step +5 +. +c +. + +if +primary +. +name +in +[ " +Etc / -/ -Format -: +UTC " -) - -println -( -' -/ -/ " -LinkName +Etc +/ +GMT " " -Target +GMT " -/ -/ -ICU -- -Target -[ -time -zone -file ] -' -) - -println +: + +primary += +Zone ( " -struct -LinkAndTarget +UTC " +primary +. +filename ) -println +# +Step +5 +. +d +. ( -" -{ -" +Not +applicable ) -println +# +Steps +5 +. +e +- +f +. + +if +primary += += +zone +: + +assert +zone +not +in +zones + +zones +. +add ( -" -const -char -* -const -link -; -" +primary ) -println +else +: + +assert +zone +not +in +links + +links +[ +zone +] += +primary +. +name + +# +Step +5 +. ( -" -const -char -* -const -target -; -" +Partial +only +links ) - -println + +for +zone +target +in +ianaLinks +. +items ( -" -} -; -" ) +: -println +identifier += +zone +. +name + +# +Step +5 +. +a +. + +primary += +identifier + +# +Step +5 +. +b +. + +if +identifier +not +in +zone_country +: + +# +Step +5 +. +b +. +i +. ( -" -" +Not +applicable ) - -println + +# +Steps +5 +. +b +. +ii +- +iii +. + +if +target +. +startswith ( " -const -LinkAndTarget -ianaLinksCanonicalizedDifferentlyByICU -[ -] -= -{ +Etc +/ " ) - -for -zone -target -icuTarget -in -incorrectLinks : + +primary += +target -println +else +: + +# +Step +5 +. +b +. +iii +. +1 +. + +identifier_code_code += +country_code_for ( +identifier +) -' -{ -" -% -s -" -" -% -s -" -} -/ -/ -% -s -[ -% -s -] -' +# +Step +5 +. +b +. +iii +. +2 +. -% +target_code_code += +country_code_for ( -zone target -icuTarget -zone +) + +# +Steps +5 . -filename +b +. +iii +. +3 +- +4 + +if +identifier_code_code += += +target_code_code +: + +primary += +target + +else +: + +# +Step +5 +. +b +. +iii +. +4 +. +a +. + +country_code_line_count += +[ + +zone + +for +( +zone +code ) - +in +zone_country +. +items +( ) - -println + +if +code += += +identifier_code_code + +] + +# +Steps +5 +. +b +. +iii +. +4 +. +b +- +c +. + +if +len ( -" -} -; -" +country_code_line_count ) - -println += += +1 +: + +primary += +country_code_line_count +[ +0 +] + +else +: + +assert +Zone ( -" -" +identifier ) - -println +in +all_backzone_links + +primary += +all_backzone_links +[ +Zone ( - -" -/ -/ -Legacy -ICU -time -zones -these -are -not -valid -IANA -time -zone -names -. -We -also -" - +identifier ) - -println +] + +assert +identifier_code_code += += +country_code_for ( -" -/ -/ -disallow -the -old -and -deprecated -System -V -time -zones -. -" +primary ) -println -( - -" -/ -/ -https -: -/ -/ -ssl +# +Step +5 . -icu -- -project +c . -org -/ -repos -/ -icu -/ -trunk -/ -icu4c -/ -source -/ -tools + +if +primary +in +[ +" +Etc / -tzcode +UTC +" +" +Etc / -icuzones +GMT " - -) -# -NOQA -: -E501 - -println -( " -const -char -* -const -legacyICUTimeZones -[ +GMT +" ] +: + +primary = -{ " +UTC +" + +# +Step +5 +. +d +. +( +Not +applicable ) -for +# +Steps +5 +. +e +- +f +. + +if +primary += += +identifier +: + +assert zone +not in -chain -( -sorted -( -legacyLinks +zones + +zones . -keys -( -) -) -sorted +add ( -legacyZones -) +zone ) + +else : -println -( -' -" -% -s -" -' -% +assert zone -) - -println +not +in +links + +links +[ +zone +] += +primary + +# +Ensure +all +zones +and +links +are +valid +. + +validateTimeZones ( -" -} -; -" +zones +links ) - -println + +# +Step +6 +. + +assert +Zone ( " +UTC " ) - -println +in +zones + +# +Step +7 +. + +return ( +zones +links +) +generatedFileWarning += " -} / / -namespace -timezone +Generated +by +make_intl_data +. +py +. +DO +NOT +EDIT +. " -) - -println -( +tzdataVersionComment += " -} / / -namespace -js +tzdata +version += +{ +0 +} " -) - -println +def +processTimeZones ( +tzdataDir +icuDir +icuTzDir +version +ignoreFactory +out +) +: + " " -) - -println -( " -# -endif -/ -* -builtin_intl_TimeZoneDataGenerated_h -* -/ +Read +the +time +zone +info +and +create +a +new +time +zone +cpp +file +. " -) -def -updateBackzoneLinks +" +" + +print ( -tzdataDir -links +" +Processing +tzdata +mapping +. +. +. +" ) -: -def -withZone ( -fn +ianaZones +ianaLinks ) -: - -return -lambda -zone_target -: -fn += +availableNamedTimeZoneIdentifiers ( -zone_target -[ -0 -] +tzdataDir +ignoreFactory ) ( -backzoneZones -backzoneLinks +icuZones +icuLinks ) = -readIANAFiles +readICUTimeZones ( -tzdataDir -[ -" -backzone -" -] +icuDir +icuTzDir +ignoreFactory ) ( -stableZones -updatedLinks -updatedZones +legacyZones +legacyLinks ) = -partition +readICULegacyZones ( +icuDir +) + +if +ignoreFactory +: -links +legacyZones . -items +add +( +Zone ( +" +Factory +" ) - +) + # -Link -not -changed -in -backzone +Remove +all +legacy +ICU +time +zones . - -withZone -( -lambda + +icuZones += +{ zone -: +for zone -not in -backzoneLinks -and +icuZones +if zone not in -backzoneZones -) - -# -Link -has -a -new -target -. +legacyZones +} + +icuLinks += +{ -withZone -( -lambda zone : +target +for +( zone +target +) in -backzoneLinks +icuLinks +. +items +( ) +if +zone +not +in +legacyLinks +} + +incorrectZones += +findIncorrectICUZones +( +ianaZones +ianaLinks +icuZones +icuLinks ) -# -Keep -stable +if +not +incorrectZones +: + +print +( +" +< +< +< +No +incorrect +ICU +time zones -and -links -with -updated -target +found +please +update +Intl . - -return -dict -( +js +! +> +> +> +" +) -chain -( - -stableZones - -map +print ( -withZone +" +< +< +< +Maybe +https +: +/ +/ +ssl +. +icu +- +project +. +org +/ +trac +/ +ticket +/ +12044 +was +fixed +? +> +> +> +" +) + +incorrectLinks += +findIncorrectICULinks ( -lambda -zone +ianaZones +ianaLinks +icuZones +icuLinks +) + +if +not +incorrectLinks : + +print ( +" +< +< +< +No +incorrect +ICU +time zone -backzoneLinks -[ -zone -] -) -) -updatedLinks +links +found +please +update +Intl +. +js +! +> +> +> +" ) +print +( +" +< +< +< +Maybe +https +: +/ +/ +ssl +. +icu +- +project +. +org +/ +trac +/ +ticket +/ +12044 +was +fixed +? +> +> +> +" ) -) -def -generateTzDataLinkTestContent +print ( -testDir -version -fileName -description -links +" +Writing +Intl +tzdata +file +. +. +. +" ) -: with io . open ( - -os -. -path -. -join -( -testDir -fileName -) +out mode = " @@ -20252,7 +20284,6 @@ = " " - ) as f @@ -20270,28 +20301,42 @@ println ( -' -/ -/ -| -reftest -| -skip -- -if +generatedFileWarning +) + +println ( -! -this +tzdataVersionComment . -hasOwnProperty +format +( +version +) +) + +println +( +" +" +) + +println +( +" +# +ifndef +builtin_intl_TimeZoneDataGenerated_h +" +) + +println ( " -Intl +# +define +builtin_intl_TimeZoneDataGenerated_h " ) -) -' -) println ( @@ -20301,70 +20346,69 @@ println ( -generatedFileWarning +" +namespace +js +{ +" ) println ( -tzdataVersionComment -. -format -( -version -) +" +namespace +timezone +{ +" ) println ( - " " -" -const -tzMapper -= -[ - -x -= -> -x - -x -= -> -x -. -toUpperCase -( ) - -x -= -> -x -. -toLowerCase + +println ( -) -] -; -" " +/ +/ +Format +: " - ) println ( -description +' +/ +/ +" +ZoneName +" +/ +/ +ICU +- +Name +[ +time +zone +file +] +' ) println ( " const -links +char +* +const +ianaZonesTreatedAsLinksByICU +[ +] = { " @@ -20372,18 +20416,9 @@ for zone -target +icuZone in -sorted -( -links -key -= -itemgetter -( -0 -) -) +incorrectZones : println @@ -20393,16 +20428,22 @@ % s " -: -" +/ +/ % s -" +[ +% +s +] ' % ( zone -target +icuZone +zone +. +filename ) ) @@ -20416,363 +20457,370 @@ println ( - -" " " -for -( -let -[ -linkName -target -] -of -Object -. -entries -( -links -) ) -{ - -if + +println ( -target -= -= -= " -Etc / -UTC -" -| -| -target -= -= -= -" -Etc / -GMT +Format +: " ) -target -= +println +( +' +/ +/ " -UTC +LinkName " -; - -for +" +Target +" +/ +/ +ICU +- +Target +[ +time +zone +file +] +' +) + +println ( -let -map -of -tzMapper +" +struct +LinkAndTarget +" ) -{ -let -dtf -= -new -Intl -. -DateTimeFormat +println ( -undefined +" { -timeZone -: -map -( -linkName -) -} +" ) -; -let -resolvedTimeZone -= -dtf -. -resolvedOptions +println ( -) -. -timeZone +" +const +char +* +const +link ; +" +) -assertEq +println ( -resolvedTimeZone -target -{ -linkName -} -- -> -{ +" +const +char +* +const target -} -) ; - -} -} " +) + +println +( " +} +; " - ) println ( - " " -" -if +) + +println ( -typeof -reportCompare -= -= -= " -function +const +LinkAndTarget +ianaLinksCanonicalizedDifferentlyByICU +[ +] += +{ " ) - -reportCompare + +for +zone +target +icuTarget +in +incorrectLinks +: + +println ( -0 -0 -" -ok + +' +{ " -) -; +% +s " " +% +s " - -) -def -generateTzDataTestBackwardLinks +} +/ +/ +% +s +[ +% +s +] +' + +% ( -tzdataDir -version -ignoreBackzone -testDir +zone +target +icuTarget +zone +. +filename ) -: - + +) + +println ( -zones -links +" +} +; +" ) -= -readIANAFiles + +println ( -tzdataDir -[ " -backward " -] ) - -assert -len + +println ( + +" +/ +/ +Legacy +ICU +time zones -) -= -= -0 - -if +these +are not -ignoreBackzone -: +valid +IANA +time +zone +names +. +We +also +" -links -= -updateBackzoneLinks -( -tzdataDir -links ) - -generateTzDataLinkTestContent -( - -testDir - -version +println +( " -timeZone_backward_links +/ +/ +disallow +the +old +and +deprecated +System +V +time +zones . -js " +) +println +( + " / / -Link -names -derived -from -IANA -Time -Zone -Database -backward -file +https +: +/ +/ +ssl +. +icu +- +project . +org +/ +repos +/ +icu +/ +trunk +/ +icu4c +/ +source +/ +tools +/ +tzcode +/ +icuzones " -links -. -items -( -) - -) -def -generateTzDataTestNotBackwardLinks -( -tzdataDir -version -ignoreBackzone -testDir ) +# +NOQA : - -tzfiles -= -filterfalse -( +E501 -{ -" -backward -" +println +( " -backzone +const +char +* +const +legacyICUTimeZones +[ +] += +{ " -} +) + +for +zone +in +chain +( +sorted +( +legacyLinks . -__contains__ -listIANAFiles +keys ( -tzdataDir ) - ) - +sorted ( -zones -links +legacyZones ) -= -readIANAFiles -( -tzdataDir -tzfiles ) - -if -not -ignoreBackzone : + +println +( +' +" +% +s +" +' +% +zone +) -links -= -updateBackzoneLinks +println ( -tzdataDir -links +" +} +; +" ) - -generateTzDataLinkTestContent -( -testDir - -version +println +( +" +" +) +println +( " -timeZone_notbackward_links -. -js +} +/ +/ +namespace +timezone " +) +println +( " +} / / -Link -names -derived -from -IANA -Time -Zone -Database -excluding -backward -file -. +namespace +js " +) -links -. -items +println ( +" +" ) - + +println +( +" +# +endif +/ +* +builtin_intl_TimeZoneDataGenerated_h +* +/ +" ) def -generateTzDataTestBackzone +generateTzDataTestLinks ( tzdataDir version -ignoreBackzone +ignoreFactory testDir ) : -backzoneFiles +fileName = -{ " -backzone -" -} - -( -bkfiles -tzfiles -) -= -partition -( -listIANAFiles -( -tzdataDir -) -backzoneFiles +timeZone_links . -__contains__ -) +js +" # Read @@ -20783,157 +20831,157 @@ . ( -zones +_ links ) = -readIANAFiles +availableNamedTimeZoneIdentifiers ( tzdataDir -tzfiles +ignoreFactory ) +with +io +. +open ( -backzones -backlinks -) -= -readIANAFiles + +os +. +path +. +join ( -tzdataDir -bkfiles +testDir +fileName ) - -if -not -ignoreBackzone -: - -comment +mode = " +w " +encoding += " -\ -/ -/ -This -file -was -generated -with -historical -pre -- -1970 -backzone -information -/ -/ -respected -. -Therefore -every -zone -key -listed -below -is -its -own -Zone -not -/ -/ -a -Link -to -a -modern +utf - -day -target -as -IANA -ignoring -backzones -would -say -. +8 " +newline += " " -else +) +as +f : -comment +println = -" -" -" -\ -/ -/ -This +partial +( +print file -was -generated -while -ignoring -historical -pre -- -1970 -backzone += +f +) + +println +( +' / / -information +| +reftest +| +skip +- +if +( +! +this . -Therefore -every -zone -key -listed -below -is -part -of -a -Link -/ -/ -whose -target -is -the -corresponding -value +hasOwnProperty +( +" +Intl +" +) +) +' +) + +println +( +" +" +) + +println +( +generatedFileWarning +) + +println +( +tzdataVersionComment +. +format +( +version +) +) + +println +( + +" +" +" +const +tzMapper += +[ + +x += +> +x + +x += +> +x . -" -" -" +toUpperCase +( +) -generateTzDataLinkTestContent +x += +> +x +. +toLowerCase ( - -testDir - -version - +) +] +; +" " -timeZone_backzone -. -js " -comment -+ +) + +println +( " / / -Backzone -zones +Link +names derived from IANA @@ -20942,276 +20990,215 @@ Database . " +) +println ( - -( -zone -zone -if -not -ignoreBackzone -else +" +const links -[ -zone -] += +{ +" ) - + for zone +target in -backzones - -if -zone -in +sorted +( links - -) - +. +items +( ) -def -generateTzDataTestBackzoneLinks +key += +itemgetter ( -tzdataDir -version -ignoreBackzone -testDir +0 +) ) : - -backzoneFiles -= -{ + +println +( +' " -backzone +% +s " -} - +: +" +% +s +" +' +% ( -bkfiles -tzfiles +zone +target ) -= -partition -( -listIANAFiles -( -tzdataDir ) -backzoneFiles -. -__contains__ + +println +( +" +} +; +" ) - -# -Read -zone -and -link -infos + +println +( + +" +" +" +for +( +let +[ +linkName +target +] +of +Object . - +entries ( -zones links ) -= -readIANAFiles -( -tzdataDir -tzfiles ) +{ +if ( -backzones -backlinks -) +target += = -readIANAFiles -( -tzdataDir -bkfiles -) - -if -not -ignoreBackzone -: - -comment = " -" -" -\ -/ -/ -This -file -was -generated -with -historical -pre -- -1970 -backzone -information -/ -/ -respected -. -Therefore -every -zone -key -listed -below -points -to -a -target -/ -/ -in -the -backzone -file -and -not -to -its -modern -- -day -target -as -IANA -ignoring -/ +Etc / -backzones -would -say -. -" -" +UTC " - -else -: - -comment +| +| +target += += = " -" -" -\ -/ -/ -This -file -was -generated -while -ignoring -historical -pre -- -1970 -backzone -/ -/ -information -. -Therefore -every -zone -key -listed -below -is -part -of -a -Link -/ +Etc / -whose -target -is -the -corresponding -value -ignoring -any -backzone -entries -. +GMT " +) + +target += " +UTC " +; -generateTzDataLinkTestContent +for ( +let +map +of +tzMapper +) +{ -testDir - -version +let +dtf += +new +Intl +. +DateTimeFormat +( +undefined +{ +timeZone +: +map +( +linkName +) +} +) +; -" -timeZone_backzone_links +let +resolvedTimeZone += +dtf . -js -" +resolvedOptions +( +) +. +timeZone +; -comment -+ +assertEq +( +resolvedTimeZone +target +{ +linkName +} +- +> +{ +target +} +) +; + +} +} " -/ -/ -Backzone -links -derived -from -IANA -Time -Zone -Database -. " +" + +) +println ( -( -zone -target +" +" +" if -not -ignoreBackzone -else -links -[ -zone -] -) - -for ( -zone -target +typeof +reportCompare += += += +" +function +" ) -in -backlinks -. -items + +reportCompare ( +0 +0 +" +ok +" ) +; +" +" +" -) - ) def generateTzDataTestVersion @@ -21407,210 +21394,60 @@ " ) -reportCompare -( -0 -0 -" -ok -" -) -; -" -" -" - -) -def -generateTzDataTestCanonicalZones -( - -tzdataDir -version -ignoreBackzone -ignoreFactory -testDir -) -: - -fileName -= -" -supportedValuesOf -- -timeZones -- -canonical -. -js -" - -# -Read -zone -and -link -infos -. - -( -ianaZones -_ -) -= -readIANATimeZones -( -tzdataDir -ignoreBackzone -ignoreFactory -) - -# -Replace -Etc -/ -GMT -and -Etc -/ -UTC -with -UTC -. - -ianaZones -. -remove -( -Zone -( -" -Etc -/ -GMT -" -) -) - -ianaZones -. -remove -( -Zone -( -" -Etc -/ -UTC -" -) -) - -ianaZones -. -add -( -Zone -( -" -UTC -" -) -) - -# -See -findIncorrectICUZones -( -) -for -why -Asia -/ -Hanoi -has -to -be -special -- -cased -. - -ianaZones -. -remove -( -Zone -( -" -Asia -/ -Hanoi -" -) -) - -if -not -ignoreBackzone -: - -comment -= -" +reportCompare +( +0 +0 " +ok " -\ -/ -/ -This -file -was -generated -with -historical -pre -- -1970 -backzone -information -/ -/ -respected -. +) +; " " " - -else -: -comment +) +def +generateTzDataTestCanonicalZones +( +tzdataDir +version +ignoreFactory +testDir +) +: + +fileName = " -" -" -\ -/ -/ -This -file -was -generated -while -ignoring -historical -pre +supportedValuesOf - -1970 -backzone -/ -/ -information +timeZones +- +canonical . +js " -" -" + +# +Read +zone +and +link +infos +. + +( +zones +_ +) += +availableNamedTimeZoneIdentifiers +( +tzdataDir +ignoreFactory +) with io @@ -21705,17 +21542,6 @@ ) ) -println -( -" -" -) - -println -( -comment -) - println ( " @@ -21731,7 +21557,7 @@ in sorted ( -ianaZones +zones ) : @@ -21810,7 +21636,6 @@ ( tzdataDir version -ignoreBackzone ignoreFactory testDir ) @@ -21857,35 +21682,11 @@ dtfTestDir ) -generateTzDataTestBackwardLinks -( -tzdataDir -version -ignoreBackzone -dtfTestDir -) - -generateTzDataTestNotBackwardLinks -( -tzdataDir -version -ignoreBackzone -dtfTestDir -) - -generateTzDataTestBackzone -( -tzdataDir -version -ignoreBackzone -dtfTestDir -) - -generateTzDataTestBackzoneLinks +generateTzDataTestLinks ( tzdataDir version -ignoreBackzone +ignoreFactory dtfTestDir ) @@ -21898,13 +21699,10 @@ generateTzDataTestCanonicalZones ( - tzdataDir version -ignoreBackzone ignoreFactory testDir - ) def updateTzdata @@ -22118,18 +21916,14 @@ tzDir ) -ignoreBackzone +out = args . -ignore_backzone +out # -TODO -: -Accept -or -ignore +Ignore the placeholder time @@ -22137,17 +21931,11 @@ " Factory " -? +. ignoreFactory = -False - -out -= -args -. -out +True version = @@ -22273,21 +22061,6 @@ icuTzDir ) -print -( -" -\ -tIgnore -backzone -file -: -% -s -" -% -ignoreBackzone -) - print ( " @@ -22363,8 +22136,6 @@ version -ignoreBackzone - ignoreFactory out @@ -22379,7 +22150,6 @@ tar ) version -ignoreBackzone ignoreFactory intlTestDir @@ -22410,8 +22180,6 @@ version -ignoreBackzone - ignoreFactory out @@ -22420,16 +22188,13 @@ generateTzDataTests ( - TzDataDir ( f ) version -ignoreBackzone ignoreFactory intlTestDir - ) else @@ -29921,130 +29686,6 @@ ) -# -ICU -doesn -' -t -include -the -backzone -file -by -default -but -we -still -like -to - -# -use -the -backzone -time -zone -names -to -avoid -user -confusion -. -This -does -lead - -# -to -formatting -" -historic -" -dates -( -pre -- -1970 -era -) -with -the -wrong -time -zone - -# -but -that -' -s -probably -acceptable -for -now -. - -parser_tz -. -add_argument -( - -" -- -- -ignore -- -backzone -" - -action -= -" -store_true -" - -help -= -" -Ignore -tzdata -' -s -' -backzone -' -file -. -Can -be -enabled -to -generate -more -" - -" -accurate -time -zone -canonicalization -reflecting -the -actual -time -" - -" -zones -as -used -by -ICU -. -" - -) - parser_tz . add_argument diff --git a/js/src/jit-test/tests/resist-fingerprinting/timezone.js b/js/src/jit-test/tests/resist-fingerprinting/timezone.js index 23b32ac154035..a60dd52c48998 100644 --- a/js/src/jit-test/tests/resist-fingerprinting/timezone.js +++ b/js/src/jit-test/tests/resist-fingerprinting/timezone.js @@ -157,7 +157,9 @@ resolvedOptions . timeZone " -PST8PDT +America +/ +Los_Angeles " ) ; diff --git a/js/src/tests/non262/Intl/DateTimeFormat/timeZone_backzone.js b/js/src/tests/non262/Intl/DateTimeFormat/timeZone_backzone.js deleted file mode 100644 index 0cc9703d0b61d..0000000000000 --- a/js/src/tests/non262/Intl/DateTimeFormat/timeZone_backzone.js +++ /dev/null @@ -1,1631 +0,0 @@ -/ -/ -| -reftest -| -skip -- -if -( -! -this -. -hasOwnProperty -( -" -Intl -" -) -) -/ -/ -Generated -by -make_intl_data -. -py -. -DO -NOT -EDIT -. -/ -/ -tzdata -version -= -2024b -const -tzMapper -= -[ -x -= -> -x -x -= -> -x -. -toUpperCase -( -) -x -= -> -x -. -toLowerCase -( -) -] -; -/ -/ -This -file -was -generated -with -historical -pre -- -1970 -backzone -information -/ -/ -respected -. -Therefore -every -zone -key -listed -below -is -its -own -Zone -not -/ -/ -a -Link -to -a -modern -- -day -target -as -IANA -ignoring -backzones -would -say -. -/ -/ -Backzone -zones -derived -from -IANA -Time -Zone -Database -. -const -links -= -{ -" -Africa -/ -Accra -" -: -" -Africa -/ -Accra -" -" -Africa -/ -Addis_Ababa -" -: -" -Africa -/ -Addis_Ababa -" -" -Africa -/ -Asmara -" -: -" -Africa -/ -Asmara -" -" -Africa -/ -Bamako -" -: -" -Africa -/ -Bamako -" -" -Africa -/ -Bangui -" -: -" -Africa -/ -Bangui -" -" -Africa -/ -Banjul -" -: -" -Africa -/ -Banjul -" -" -Africa -/ -Blantyre -" -: -" -Africa -/ -Blantyre -" -" -Africa -/ -Brazzaville -" -: -" -Africa -/ -Brazzaville -" -" -Africa -/ -Bujumbura -" -: -" -Africa -/ -Bujumbura -" -" -Africa -/ -Conakry -" -: -" -Africa -/ -Conakry -" -" -Africa -/ -Dakar -" -: -" -Africa -/ -Dakar -" -" -Africa -/ -Dar_es_Salaam -" -: -" -Africa -/ -Dar_es_Salaam -" -" -Africa -/ -Djibouti -" -: -" -Africa -/ -Djibouti -" -" -Africa -/ -Douala -" -: -" -Africa -/ -Douala -" -" -Africa -/ -Freetown -" -: -" -Africa -/ -Freetown -" -" -Africa -/ -Gaborone -" -: -" -Africa -/ -Gaborone -" -" -Africa -/ -Harare -" -: -" -Africa -/ -Harare -" -" -Africa -/ -Kampala -" -: -" -Africa -/ -Kampala -" -" -Africa -/ -Kigali -" -: -" -Africa -/ -Kigali -" -" -Africa -/ -Kinshasa -" -: -" -Africa -/ -Kinshasa -" -" -Africa -/ -Libreville -" -: -" -Africa -/ -Libreville -" -" -Africa -/ -Lome -" -: -" -Africa -/ -Lome -" -" -Africa -/ -Luanda -" -: -" -Africa -/ -Luanda -" -" -Africa -/ -Lubumbashi -" -: -" -Africa -/ -Lubumbashi -" -" -Africa -/ -Lusaka -" -: -" -Africa -/ -Lusaka -" -" -Africa -/ -Malabo -" -: -" -Africa -/ -Malabo -" -" -Africa -/ -Maseru -" -: -" -Africa -/ -Maseru -" -" -Africa -/ -Mbabane -" -: -" -Africa -/ -Mbabane -" -" -Africa -/ -Mogadishu -" -: -" -Africa -/ -Mogadishu -" -" -Africa -/ -Niamey -" -: -" -Africa -/ -Niamey -" -" -Africa -/ -Nouakchott -" -: -" -Africa -/ -Nouakchott -" -" -Africa -/ -Ouagadougou -" -: -" -Africa -/ -Ouagadougou -" -" -Africa -/ -Porto -- -Novo -" -: -" -Africa -/ -Porto -- -Novo -" -" -Africa -/ -Timbuktu -" -: -" -Africa -/ -Timbuktu -" -" -America -/ -Anguilla -" -: -" -America -/ -Anguilla -" -" -America -/ -Antigua -" -: -" -America -/ -Antigua -" -" -America -/ -Argentina -/ -ComodRivadavia -" -: -" -America -/ -Argentina -/ -ComodRivadavia -" -" -America -/ -Aruba -" -: -" -America -/ -Aruba -" -" -America -/ -Atikokan -" -: -" -America -/ -Atikokan -" -" -America -/ -Blanc -- -Sablon -" -: -" -America -/ -Blanc -- -Sablon -" -" -America -/ -Cayman -" -: -" -America -/ -Cayman -" -" -America -/ -Coral_Harbour -" -: -" -America -/ -Coral_Harbour -" -" -America -/ -Creston -" -: -" -America -/ -Creston -" -" -America -/ -Curacao -" -: -" -America -/ -Curacao -" -" -America -/ -Dominica -" -: -" -America -/ -Dominica -" -" -America -/ -Ensenada -" -: -" -America -/ -Ensenada -" -" -America -/ -Grenada -" -: -" -America -/ -Grenada -" -" -America -/ -Guadeloupe -" -: -" -America -/ -Guadeloupe -" -" -America -/ -Montreal -" -: -" -America -/ -Montreal -" -" -America -/ -Montserrat -" -: -" -America -/ -Montserrat -" -" -America -/ -Nassau -" -: -" -America -/ -Nassau -" -" -America -/ -Nipigon -" -: -" -America -/ -Nipigon -" -" -America -/ -Pangnirtung -" -: -" -America -/ -Pangnirtung -" -" -America -/ -Port_of_Spain -" -: -" -America -/ -Port_of_Spain -" -" -America -/ -Rainy_River -" -: -" -America -/ -Rainy_River -" -" -America -/ -Rosario -" -: -" -America -/ -Rosario -" -" -America -/ -St_Kitts -" -: -" -America -/ -St_Kitts -" -" -America -/ -St_Lucia -" -: -" -America -/ -St_Lucia -" -" -America -/ -St_Thomas -" -: -" -America -/ -St_Thomas -" -" -America -/ -St_Vincent -" -: -" -America -/ -St_Vincent -" -" -America -/ -Thunder_Bay -" -: -" -America -/ -Thunder_Bay -" -" -America -/ -Tortola -" -: -" -America -/ -Tortola -" -" -America -/ -Yellowknife -" -: -" -America -/ -Yellowknife -" -" -Antarctica -/ -DumontDUrville -" -: -" -Antarctica -/ -DumontDUrville -" -" -Antarctica -/ -McMurdo -" -: -" -Antarctica -/ -McMurdo -" -" -Antarctica -/ -Syowa -" -: -" -Antarctica -/ -Syowa -" -" -Asia -/ -Aden -" -: -" -Asia -/ -Aden -" -" -Asia -/ -Bahrain -" -: -" -Asia -/ -Bahrain -" -" -Asia -/ -Brunei -" -: -" -Asia -/ -Brunei -" -" -Asia -/ -Chongqing -" -: -" -Asia -/ -Chongqing -" -" -Asia -/ -Harbin -" -: -" -Asia -/ -Harbin -" -" -Asia -/ -Kashgar -" -: -" -Asia -/ -Kashgar -" -" -Asia -/ -Kuala_Lumpur -" -: -" -Asia -/ -Kuala_Lumpur -" -" -Asia -/ -Kuwait -" -: -" -Asia -/ -Kuwait -" -" -Asia -/ -Muscat -" -: -" -Asia -/ -Muscat -" -" -Asia -/ -Phnom_Penh -" -: -" -Asia -/ -Phnom_Penh -" -" -Asia -/ -Tel_Aviv -" -: -" -Asia -/ -Tel_Aviv -" -" -Asia -/ -Vientiane -" -: -" -Asia -/ -Vientiane -" -" -Atlantic -/ -Jan_Mayen -" -: -" -Atlantic -/ -Jan_Mayen -" -" -Atlantic -/ -Reykjavik -" -: -" -Atlantic -/ -Reykjavik -" -" -Atlantic -/ -St_Helena -" -: -" -Atlantic -/ -St_Helena -" -" -Australia -/ -Currie -" -: -" -Australia -/ -Currie -" -" -CET -" -: -" -CET -" -" -CST6CDT -" -: -" -CST6CDT -" -" -EET -" -: -" -EET -" -" -EST -" -: -" -EST -" -" -EST5EDT -" -: -" -EST5EDT -" -" -Europe -/ -Amsterdam -" -: -" -Europe -/ -Amsterdam -" -" -Europe -/ -Belfast -" -: -" -Europe -/ -Belfast -" -" -Europe -/ -Copenhagen -" -: -" -Europe -/ -Copenhagen -" -" -Europe -/ -Guernsey -" -: -" -Europe -/ -Guernsey -" -" -Europe -/ -Isle_of_Man -" -: -" -Europe -/ -Isle_of_Man -" -" -Europe -/ -Jersey -" -: -" -Europe -/ -Jersey -" -" -Europe -/ -Ljubljana -" -: -" -Europe -/ -Ljubljana -" -" -Europe -/ -Luxembourg -" -: -" -Europe -/ -Luxembourg -" -" -Europe -/ -Monaco -" -: -" -Europe -/ -Monaco -" -" -Europe -/ -Oslo -" -: -" -Europe -/ -Oslo -" -" -Europe -/ -Sarajevo -" -: -" -Europe -/ -Sarajevo -" -" -Europe -/ -Skopje -" -: -" -Europe -/ -Skopje -" -" -Europe -/ -Stockholm -" -: -" -Europe -/ -Stockholm -" -" -Europe -/ -Tiraspol -" -: -" -Europe -/ -Tiraspol -" -" -Europe -/ -Uzhgorod -" -: -" -Europe -/ -Uzhgorod -" -" -Europe -/ -Vaduz -" -: -" -Europe -/ -Vaduz -" -" -Europe -/ -Zagreb -" -: -" -Europe -/ -Zagreb -" -" -Europe -/ -Zaporozhye -" -: -" -Europe -/ -Zaporozhye -" -" -HST -" -: -" -HST -" -" -Indian -/ -Antananarivo -" -: -" -Indian -/ -Antananarivo -" -" -Indian -/ -Christmas -" -: -" -Indian -/ -Christmas -" -" -Indian -/ -Cocos -" -: -" -Indian -/ -Cocos -" -" -Indian -/ -Comoro -" -: -" -Indian -/ -Comoro -" -" -Indian -/ -Kerguelen -" -: -" -Indian -/ -Kerguelen -" -" -Indian -/ -Mahe -" -: -" -Indian -/ -Mahe -" -" -Indian -/ -Mayotte -" -: -" -Indian -/ -Mayotte -" -" -Indian -/ -Reunion -" -: -" -Indian -/ -Reunion -" -" -MET -" -: -" -MET -" -" -MST -" -: -" -MST -" -" -MST7MDT -" -: -" -MST7MDT -" -" -PST8PDT -" -: -" -PST8PDT -" -" -Pacific -/ -Chuuk -" -: -" -Pacific -/ -Chuuk -" -" -Pacific -/ -Enderbury -" -: -" -Pacific -/ -Enderbury -" -" -Pacific -/ -Funafuti -" -: -" -Pacific -/ -Funafuti -" -" -Pacific -/ -Johnston -" -: -" -Pacific -/ -Johnston -" -" -Pacific -/ -Majuro -" -: -" -Pacific -/ -Majuro -" -" -Pacific -/ -Midway -" -: -" -Pacific -/ -Midway -" -" -Pacific -/ -Pohnpei -" -: -" -Pacific -/ -Pohnpei -" -" -Pacific -/ -Saipan -" -: -" -Pacific -/ -Saipan -" -" -Pacific -/ -Wake -" -: -" -Pacific -/ -Wake -" -" -Pacific -/ -Wallis -" -: -" -Pacific -/ -Wallis -" -" -WET -" -: -" -WET -" -} -; -for -( -let -[ -linkName -target -] -of -Object -. -entries -( -links -) -) -{ -if -( -target -= -= -= -" -Etc -/ -UTC -" -| -| -target -= -= -= -" -Etc -/ -GMT -" -) -target -= -" -UTC -" -; -for -( -let -map -of -tzMapper -) -{ -let -dtf -= -new -Intl -. -DateTimeFormat -( -undefined -{ -timeZone -: -map -( -linkName -) -} -) -; -let -resolvedTimeZone -= -dtf -. -resolvedOptions -( -) -. -timeZone -; -assertEq -( -resolvedTimeZone -target -{ -linkName -} -- -> -{ -target -} -) -; -} -} -if -( -typeof -reportCompare -= -= -= -" -function -" -) -reportCompare -( -0 -0 -" -ok -" -) -; diff --git a/js/src/tests/non262/Intl/DateTimeFormat/timeZone_backzone_links.js b/js/src/tests/non262/Intl/DateTimeFormat/timeZone_backzone_links.js deleted file mode 100644 index 14f23bd0e619d..0000000000000 --- a/js/src/tests/non262/Intl/DateTimeFormat/timeZone_backzone_links.js +++ /dev/null @@ -1,390 +0,0 @@ -/ -/ -| -reftest -| -skip -- -if -( -! -this -. -hasOwnProperty -( -" -Intl -" -) -) -/ -/ -Generated -by -make_intl_data -. -py -. -DO -NOT -EDIT -. -/ -/ -tzdata -version -= -2024b -const -tzMapper -= -[ -x -= -> -x -x -= -> -x -. -toUpperCase -( -) -x -= -> -x -. -toLowerCase -( -) -] -; -/ -/ -This -file -was -generated -with -historical -pre -- -1970 -backzone -information -/ -/ -respected -. -Therefore -every -zone -key -listed -below -points -to -a -target -/ -/ -in -the -backzone -file -and -not -to -its -modern -- -day -target -as -IANA -ignoring -/ -/ -backzones -would -say -. -/ -/ -Backzone -links -derived -from -IANA -Time -Zone -Database -. -const -links -= -{ -" -Africa -/ -Asmera -" -: -" -Africa -/ -Asmara -" -" -America -/ -Kralendijk -" -: -" -America -/ -Curacao -" -" -America -/ -Lower_Princes -" -: -" -America -/ -Curacao -" -" -America -/ -Marigot -" -: -" -America -/ -Port_of_Spain -" -" -America -/ -St_Barthelemy -" -: -" -America -/ -Port_of_Spain -" -" -America -/ -Virgin -" -: -" -America -/ -St_Thomas -" -" -Antarctica -/ -South_Pole -" -: -" -Antarctica -/ -McMurdo -" -" -Arctic -/ -Longyearbyen -" -: -" -Europe -/ -Oslo -" -" -Asia -/ -Chungking -" -: -" -Asia -/ -Chongqing -" -" -Iceland -" -: -" -Atlantic -/ -Reykjavik -" -" -Pacific -/ -Ponape -" -: -" -Pacific -/ -Pohnpei -" -" -Pacific -/ -Truk -" -: -" -Pacific -/ -Chuuk -" -" -Pacific -/ -Yap -" -: -" -Pacific -/ -Chuuk -" -} -; -for -( -let -[ -linkName -target -] -of -Object -. -entries -( -links -) -) -{ -if -( -target -= -= -= -" -Etc -/ -UTC -" -| -| -target -= -= -= -" -Etc -/ -GMT -" -) -target -= -" -UTC -" -; -for -( -let -map -of -tzMapper -) -{ -let -dtf -= -new -Intl -. -DateTimeFormat -( -undefined -{ -timeZone -: -map -( -linkName -) -} -) -; -let -resolvedTimeZone -= -dtf -. -resolvedOptions -( -) -. -timeZone -; -assertEq -( -resolvedTimeZone -target -{ -linkName -} -- -> -{ -target -} -) -; -} -} -if -( -typeof -reportCompare -= -= -= -" -function -" -) -reportCompare -( -0 -0 -" -ok -" -) -; diff --git a/js/src/tests/non262/Intl/DateTimeFormat/timeZone_backward_links.js b/js/src/tests/non262/Intl/DateTimeFormat/timeZone_links.js similarity index 83% rename from js/src/tests/non262/Intl/DateTimeFormat/timeZone_backward_links.js rename to js/src/tests/non262/Intl/DateTimeFormat/timeZone_links.js index ae62870a74c2d..c793295c6ac30 100644 --- a/js/src/tests/non262/Intl/DateTimeFormat/timeZone_backward_links.js +++ b/js/src/tests/non262/Intl/DateTimeFormat/timeZone_links.js @@ -71,8 +71,6 @@ IANA Time Zone Database -backward -file . const links @@ -90,6 +88,32 @@ Africa Asmara " " +Africa +/ +Timbuktu +" +: +" +Africa +/ +Bamako +" +" +America +/ +Argentina +/ +ComodRivadavia +" +: +" +America +/ +Argentina +/ +Catamarca +" +" America / Atka @@ -129,6 +153,17 @@ Catamarca " America / +Coral_Harbour +" +: +" +America +/ +Atikokan +" +" +America +/ Cordoba " : @@ -142,6 +177,17 @@ Cordoba " America / +Ensenada +" +: +" +America +/ +Tijuana +" +" +America +/ Fort_Wayne " : @@ -205,61 +251,61 @@ Knox " America / -Kralendijk +Louisville " : " America / -Curacao +Kentucky +/ +Louisville " " America / -Louisville +Mendoza " : " America / -Kentucky +Argentina / -Louisville +Mendoza " " America / -Lower_Princes +Montreal " : " America / -Curacao +Toronto " " America / -Marigot +Nipigon " : " America / -Port_of_Spain +Toronto " " America / -Mendoza +Pangnirtung " : " America / -Argentina -/ -Mendoza +Iqaluit " " America @@ -275,6 +321,30 @@ Rio_Branco " America / +Rainy_River +" +: +" +America +/ +Winnipeg +" +" +America +/ +Rosario +" +: +" +America +/ +Argentina +/ +Cordoba +" +" +America +/ Santa_Isabel " : @@ -297,13 +367,13 @@ Denver " America / -St_Barthelemy +Thunder_Bay " : " America / -Port_of_Spain +Toronto " " America @@ -317,26 +387,26 @@ America St_Thomas " " -Antarctica +America / -South_Pole +Yellowknife " : " -Antarctica +America / -McMurdo +Edmonton " " -Arctic +Antarctica / -Longyearbyen +South_Pole " : " -Europe +Antarctica / -Oslo +McMurdo " " Asia @@ -374,13 +444,24 @@ Ulaanbaatar " Asia / +Chongqing +" +: +" +Asia +/ +Shanghai +" +" +Asia +/ Chungking " : " Asia / -Chongqing +Shanghai " " Asia @@ -396,6 +477,17 @@ Dhaka " Asia / +Harbin +" +: +" +Asia +/ +Shanghai +" +" +Asia +/ Istanbul " : @@ -407,6 +499,17 @@ Istanbul " Asia / +Kashgar +" +: +" +Asia +/ +Urumqi +" +" +Asia +/ Katmandu " : @@ -451,6 +554,17 @@ Ho_Chi_Minh " Asia / +Tel_Aviv +" +: +" +Asia +/ +Jerusalem +" +" +Asia +/ Thimbu " : @@ -493,6 +607,17 @@ Atlantic Faroe " " +Atlantic +/ +Jan_Mayen +" +: +" +Arctic +/ +Longyearbyen +" +" Australia / ACT @@ -517,6 +642,17 @@ Sydney " Australia / +Currie +" +: +" +Australia +/ +Hobart +" +" +Australia +/ LHI " : @@ -658,6 +794,24 @@ America Manaus " " +CET +" +: +" +Europe +/ +Brussels +" +" +CST6CDT +" +: +" +America +/ +Chicago +" +" Canada / Atlantic @@ -777,6 +931,33 @@ America Havana " " +EET +" +: +" +Europe +/ +Athens +" +" +EST +" +: +" +America +/ +Panama +" +" +EST5EDT +" +: +" +America +/ +New_York +" +" Egypt " : @@ -798,14 +979,21 @@ Dublin Etc / GMT -+ -0 " : " +UTC +" +" Etc / GMT ++ +0 +" +: +" +UTC " " Etc @@ -816,9 +1004,7 @@ GMT " : " -Etc -/ -GMT +UTC " " Etc @@ -827,9 +1013,7 @@ GMT0 " : " -Etc -/ -GMT +UTC " " Etc @@ -838,9 +1022,7 @@ Greenwich " : " -Etc -/ -GMT +UTC " " Etc @@ -849,53 +1031,45 @@ UCT " : " -Etc -/ UTC " " Etc / -Universal +UTC " : " -Etc -/ UTC " " Etc / -Zulu +Universal " : " -Etc -/ UTC " " -Europe +Etc / -Bratislava +Zulu " : " -Europe -/ -Prague +UTC " " Europe / -Busingen +Belfast " : " Europe / -Zurich +London " " Europe @@ -911,17 +1085,6 @@ Kyiv " Europe / -Mariehamn -" -: -" -Europe -/ -Helsinki -" -" -Europe -/ Nicosia " : @@ -933,35 +1096,35 @@ Nicosia " Europe / -Podgorica +Tiraspol " : " Europe / -Belgrade +Chisinau " " Europe / -San_Marino +Uzhgorod " : " Europe / -Rome +Kyiv " " Europe / -Vatican +Zaporozhye " : " Europe / -Rome +Kyiv " " GB @@ -985,14 +1148,19 @@ London " " GMT +" +: +" +UTC +" +" +GMT + 0 " : " -Etc -/ -GMT +UTC " " GMT @@ -1001,27 +1169,30 @@ GMT " : " -Etc -/ -GMT +UTC " " GMT0 " : " -Etc -/ -GMT +UTC " " Greenwich " : " -Etc +UTC +" +" +HST +" +: +" +Pacific / -GMT +Honolulu " " Hongkong @@ -1096,6 +1267,33 @@ Africa Tripoli " " +MET +" +: +" +Europe +/ +Brussels +" +" +MST +" +: +" +America +/ +Phoenix +" +" +MST7MDT +" +: +" +America +/ +Denver +" +" Mexico / BajaNorte @@ -1167,6 +1365,37 @@ Asia Shanghai " " +PST8PDT +" +: +" +America +/ +Los_Angeles +" +" +Pacific +/ +Enderbury +" +: +" +Pacific +/ +Kanton +" +" +Pacific +/ +Johnston +" +: +" +Pacific +/ +Honolulu +" +" Pacific / Ponape @@ -1269,8 +1498,6 @@ UCT " : " -Etc -/ UTC " " @@ -1414,41 +1641,37 @@ Pacific Pago_Pago " " -UTC +Universal " : " -Etc -/ UTC " " -Universal +W +- +SU " : " -Etc +Europe / -UTC +Moscow " " -W -- -SU +WET " : " Europe / -Moscow +Lisbon " " Zulu " : " -Etc -/ UTC " } diff --git a/js/src/tests/non262/Intl/DateTimeFormat/timeZone_notbackward_links.js b/js/src/tests/non262/Intl/DateTimeFormat/timeZone_notbackward_links.js deleted file mode 100644 index 1c4aa265f687d..0000000000000 --- a/js/src/tests/non262/Intl/DateTimeFormat/timeZone_notbackward_links.js +++ /dev/null @@ -1,211 +0,0 @@ -/ -/ -| -reftest -| -skip -- -if -( -! -this -. -hasOwnProperty -( -" -Intl -" -) -) -/ -/ -Generated -by -make_intl_data -. -py -. -DO -NOT -EDIT -. -/ -/ -tzdata -version -= -2024b -const -tzMapper -= -[ -x -= -> -x -x -= -> -x -. -toUpperCase -( -) -x -= -> -x -. -toLowerCase -( -) -] -; -/ -/ -Link -names -derived -from -IANA -Time -Zone -Database -excluding -backward -file -. -const -links -= -{ -" -GMT -" -: -" -Etc -/ -GMT -" -} -; -for -( -let -[ -linkName -target -] -of -Object -. -entries -( -links -) -) -{ -if -( -target -= -= -= -" -Etc -/ -UTC -" -| -| -target -= -= -= -" -Etc -/ -GMT -" -) -target -= -" -UTC -" -; -for -( -let -map -of -tzMapper -) -{ -let -dtf -= -new -Intl -. -DateTimeFormat -( -undefined -{ -timeZone -: -map -( -linkName -) -} -) -; -let -resolvedTimeZone -= -dtf -. -resolvedOptions -( -) -. -timeZone -; -assertEq -( -resolvedTimeZone -target -{ -linkName -} -- -> -{ -target -} -) -; -} -} -if -( -typeof -reportCompare -= -= -= -" -function -" -) -reportCompare -( -0 -0 -" -ok -" -) -; diff --git a/js/src/tests/non262/Intl/DateTimeFormat/tz-environment-variable.js b/js/src/tests/non262/Intl/DateTimeFormat/tz-environment-variable.js index 612e89ac0b352..781988130cc41 100644 --- a/js/src/tests/non262/Intl/DateTimeFormat/tz-environment-variable.js +++ b/js/src/tests/non262/Intl/DateTimeFormat/tz-environment-variable.js @@ -270,6 +270,13 @@ id " EST5EDT " +normalized +: +" +America +/ +New_York +" } { id @@ -277,6 +284,13 @@ id " CST6CDT " +normalized +: +" +America +/ +Chicago +" } { id @@ -284,6 +298,13 @@ id " MST7MDT " +normalized +: +" +America +/ +Denver +" } { id @@ -291,6 +312,13 @@ id " PST8PDT " +normalized +: +" +America +/ +Los_Angeles +" } / / diff --git a/js/src/tests/non262/Intl/supportedValuesOf-timeZones-canonical.js b/js/src/tests/non262/Intl/supportedValuesOf-timeZones-canonical.js index 77c86d07b0891..6e1f463b651bf 100644 --- a/js/src/tests/non262/Intl/supportedValuesOf-timeZones-canonical.js +++ b/js/src/tests/non262/Intl/supportedValuesOf-timeZones-canonical.js @@ -35,23 +35,6 @@ tzdata version = 2024b -/ -/ -This -file -was -generated -with -historical -pre -- -1970 -backzone -information -/ -/ -respected -. const zones = @@ -306,11 +289,6 @@ Sao_Tome " Africa / -Timbuktu -" -" -Africa -/ Tripoli " " @@ -367,13 +345,6 @@ America / Argentina / -ComodRivadavia -" -" -America -/ -Argentina -/ Cordoba " " @@ -549,11 +520,6 @@ Ciudad_Juarez " America / -Coral_Harbour -" -" -America -/ Costa_Rica " " @@ -619,11 +585,6 @@ El_Salvador " America / -Ensenada -" -" -America -/ Fort_Nelson " " @@ -779,6 +740,11 @@ Monticello " America / +Kralendijk +" +" +America +/ La_Paz " " @@ -794,6 +760,11 @@ Los_Angeles " America / +Lower_Princes +" +" +America +/ Maceio " " @@ -809,6 +780,11 @@ Manaus " America / +Marigot +" +" +America +/ Martinique " " @@ -864,11 +840,6 @@ Montevideo " America / -Montreal -" -" -America -/ Montserrat " " @@ -884,11 +855,6 @@ New_York " America / -Nipigon -" -" -America -/ Nome " " @@ -935,11 +901,6 @@ Panama " America / -Pangnirtung -" -" -America -/ Paramaribo " " @@ -979,11 +940,6 @@ Punta_Arenas " America / -Rainy_River -" -" -America -/ Rankin_Inlet " " @@ -1009,11 +965,6 @@ Rio_Branco " America / -Rosario -" -" -America -/ Santarem " " @@ -1044,6 +995,11 @@ Sitka " America / +St_Barthelemy +" +" +America +/ St_Johns " " @@ -1084,11 +1040,6 @@ Thule " America / -Thunder_Bay -" -" -America -/ Tijuana " " @@ -1122,11 +1073,6 @@ America Yakutat " " -America -/ -Yellowknife -" -" Antarctica / Casey @@ -1182,6 +1128,11 @@ Antarctica Vostok " " +Arctic +/ +Longyearbyen +" +" Asia / Aden @@ -1269,11 +1220,6 @@ Chita " Asia / -Chongqing -" -" -Asia -/ Colombo " " @@ -1314,11 +1260,6 @@ Gaza " Asia / -Harbin -" -" -Asia -/ Hebron " " @@ -1374,11 +1315,6 @@ Karachi " Asia / -Kashgar -" -" -Asia -/ Kathmandu " " @@ -1549,11 +1485,6 @@ Tehran " Asia / -Tel_Aviv -" -" -Asia -/ Thimphu " " @@ -1641,11 +1572,6 @@ Faroe " Atlantic / -Jan_Mayen -" -" -Atlantic -/ Madeira " " @@ -1686,11 +1612,6 @@ Broken_Hill " Australia / -Currie -" -" -Australia -/ Darwin " " @@ -1729,21 +1650,6 @@ Australia Sydney " " -CET -" -" -CST6CDT -" -" -EET -" -" -EST -" -" -EST5EDT -" -" Etc / GMT @@ -1948,17 +1854,17 @@ Athens " Europe / -Belfast +Belgrade " " Europe / -Belgrade +Berlin " " Europe / -Berlin +Bratislava " " Europe @@ -1978,6 +1884,11 @@ Budapest " Europe / +Busingen +" +" +Europe +/ Chisinau " " @@ -2068,6 +1979,11 @@ Malta " Europe / +Mariehamn +" +" +Europe +/ Minsk " " @@ -2093,6 +2009,11 @@ Paris " Europe / +Podgorica +" +" +Europe +/ Prague " " @@ -2113,6 +2034,11 @@ Samara " Europe / +San_Marino +" +" +Europe +/ Sarajevo " " @@ -2153,22 +2079,17 @@ Tirane " Europe / -Tiraspol -" -" -Europe -/ Ulyanovsk " " Europe / -Uzhgorod +Vaduz " " Europe / -Vaduz +Vatican " " Europe @@ -2198,20 +2119,9 @@ Zagreb " Europe / -Zaporozhye -" -" -Europe -/ Zurich " " -Factory -" -" -HST -" -" Indian / Antananarivo @@ -2267,18 +2177,6 @@ Indian Reunion " " -MET -" -" -MST -" -" -MST7MDT -" -" -PST8PDT -" -" Pacific / Apia @@ -2316,11 +2214,6 @@ Efate " Pacific / -Enderbury -" -" -Pacific -/ Fakaofo " " @@ -2361,11 +2254,6 @@ Honolulu " Pacific / -Johnston -" -" -Pacific -/ Kanton " " @@ -2481,9 +2369,6 @@ Wallis " UTC " -" -WET -" ] ; let