Skip to content

Commit

Permalink
Bug 1786025: Update time zone data to tzdata2022b. r=platform-i18n-re…
Browse files Browse the repository at this point in the history
…viewers,dminor

Differential Revision: https://phabricator.services.mozilla.com/D155068
  • Loading branch information
anba committed Aug 19, 2022
1 parent 31d01d4 commit 52aed99
Show file tree
Hide file tree
Showing 24 changed files with 601 additions and 650 deletions.
Binary file modified config/external/icu/data/icudt71l.dat
Binary file not shown.
6 changes: 6 additions & 0 deletions intl/components/gtest/TestTimeZone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,13 @@ TEST(IntlTimeZone, GetAvailableTimeZones)
{
constexpr auto EuropeBerlin = MakeStringSpan("Europe/Berlin");
constexpr auto EuropeBusingen = MakeStringSpan("Europe/Busingen");
constexpr auto AtlanticJan_Mayen = MakeStringSpan("Atlantic/Jan_Mayen");

auto timeZones = TimeZone::GetAvailableTimeZones("DE").unwrap();

bool hasEuropeBerlin = false;
bool hasEuropeBusingen = false;
bool hasAtlanticJan_Mayen = false;

for (auto timeZone : timeZones) {
auto span = timeZone.unwrap();
Expand All @@ -169,6 +171,9 @@ TEST(IntlTimeZone, GetAvailableTimeZones)
} else if (span == EuropeBusingen) {
ASSERT_FALSE(hasEuropeBusingen);
hasEuropeBusingen = true;
} else if (span == AtlanticJan_Mayen) {
ASSERT_FALSE(hasAtlanticJan_Mayen);
hasAtlanticJan_Mayen = true;
} else {
std::string str(span.data(), span.size());
ADD_FAILURE() << "Unexpected time zone: " << str;
Expand All @@ -177,6 +182,7 @@ TEST(IntlTimeZone, GetAvailableTimeZones)

ASSERT_TRUE(hasEuropeBerlin);
ASSERT_TRUE(hasEuropeBusingen);
ASSERT_TRUE(hasAtlanticJan_Mayen);
}

TEST(IntlTimeZone, GetAvailableTimeZonesNoRegion)
Expand Down
6 changes: 3 additions & 3 deletions intl/tzdata/GIT-INFO
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
commit e75fe57b8c94a71cd165209c893bb6f1a3dcc935
commit 06611e9b8c6e14299e07d9ff06db61137fea94da
Author: yumaoka <[email protected]>
Date: Thu Mar 17 11:12:29 2022 -0400
Date: Thu Aug 18 13:02:20 2022 -0400

ICU-21949 tzdata2022a update data
ICU-22118 tzdata 2022b
2 changes: 1 addition & 1 deletion intl/tzdata/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2022a
2022b
Binary file modified intl/tzdata/source/be/metaZones.res
Binary file not shown.
Binary file modified intl/tzdata/source/be/timezoneTypes.res
Binary file not shown.
Binary file modified intl/tzdata/source/be/zoneinfo64.res
Binary file not shown.
Binary file modified intl/tzdata/source/ee/metaZones.res
Binary file not shown.
Binary file modified intl/tzdata/source/ee/timezoneTypes.res
Binary file not shown.
Binary file modified intl/tzdata/source/ee/zoneinfo64.res
Binary file not shown.
Binary file modified intl/tzdata/source/le/metaZones.res
Binary file not shown.
Binary file modified intl/tzdata/source/le/timezoneTypes.res
Binary file not shown.
Binary file modified intl/tzdata/source/le/zoneinfo64.res
Binary file not shown.
1 change: 1 addition & 0 deletions intl/tzdata/source/metaZones.txt
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,7 @@ metaZones:table(nofallback){
wall{"Wallis"}
yaku{"Yakutsk"}
yeka{"Yekaterinburg"}
yuko{"Yukon"}
}
metazoneInfo{
"Africa:Abidjan"{
Expand Down
1 change: 1 addition & 0 deletions intl/tzdata/source/timezoneTypes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ timezoneTypes:table(nofallback){
"Etc:Universal"{"Etc/UTC"}
"Etc:Zulu"{"Etc/UTC"}
"Europe:Belfast"{"Europe/London"}
"Europe:Kyiv"{"Europe/Kiev"}
"Europe:Nicosia"{"Asia/Nicosia"}
"Europe:Tiraspol"{"Europe/Chisinau"}
"Mexico:BajaNorte"{"America/Tijuana"}
Expand Down
1,140 changes: 513 additions & 627 deletions intl/tzdata/source/zoneinfo64.txt

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions js/src/builtin/intl/TimeZoneDataGenerated.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Generated by make_intl_data.py. DO NOT EDIT.
// tzdata version = 2022a
// tzdata version = 2022b

#ifndef builtin_intl_TimeZoneDataGenerated_h
#define builtin_intl_TimeZoneDataGenerated_h
Expand Down Expand Up @@ -36,12 +36,13 @@ const char* const ianaZonesTreatedAsLinksByICU[] = {
"Atlantic/Jan_Mayen", // Arctic/Longyearbyen [backzone]
"EST", // Etc/GMT+5 [northamerica]
"Europe/Belfast", // Europe/London [backzone]
"Europe/Kyiv", // Europe/Kiev [europe]
"Europe/Tiraspol", // Europe/Chisinau [backzone]
"HST", // Etc/GMT+10 [northamerica]
"MST", // Etc/GMT+7 [northamerica]
"Pacific/Chuuk", // Pacific/Truk [australasia]
"Pacific/Chuuk", // Pacific/Truk [backzone]
"Pacific/Kanton", // Pacific/Enderbury [australasia]
"Pacific/Pohnpei", // Pacific/Ponape [australasia]
"Pacific/Pohnpei", // Pacific/Ponape [backzone]
};

// Format:
Expand Down Expand Up @@ -78,6 +79,7 @@ const LinkAndTarget ianaLinksCanonicalizedDifferentlyByICU[] = {
{ "Atlantic/Faeroe", "Atlantic/Faroe" }, // Atlantic/Faeroe [backward]
{ "Europe/Bratislava", "Europe/Prague" }, // Europe/Bratislava [europe]
{ "Europe/Busingen", "Europe/Zurich" }, // Europe/Busingen [europe]
{ "Europe/Kiev", "Europe/Kyiv" }, // Europe/Kiev [backward]
{ "Europe/Mariehamn", "Europe/Helsinki" }, // Europe/Mariehamn [europe]
{ "Europe/Podgorica", "Europe/Belgrade" }, // Europe/Podgorica [europe]
{ "Europe/San_Marino", "Europe/Rome" }, // Europe/San_Marino [europe]
Expand Down
44 changes: 36 additions & 8 deletions js/src/tests/non262/Date/time-zones-imported.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,25 +564,53 @@ inTimeZone("Australia/Lord_Howe", () => {

// File: Date/Europe_Amsterdam.js
// Europe/Amsterdam as an example for mean time like timezones after LMT (AMT, NST).
//
// tzdata2022b changed Europe/Amsterdam into a link to Europe/Brussels.

inTimeZone("Europe/Amsterdam", () => {
{
let local = new DateTime.Local(1935, Month.January, 1, DayOfWeek.Tuesday, 0, 0, 0);
let utc = new DateTime.UTC(1934, Month.December, 31, DayOfWeek.Monday, 23, 40, 28);
let utc = new DateTime.UTC(1935, Month.January, 1, DayOfWeek.Tuesday, 0, 0, 0);

assertDate(local, utc, TimeZone(+0,19,32), {
String: "Tue Jan 01 1935 00:00:00 GMT+0019 (Central European Standard Time)",
UTCString: "Mon, 31 Dec 1934 23:40:28 GMT",
assertDate(local, utc, TimeZone(+0,0,0), {
String: "Tue Jan 01 1935 00:00:00 GMT+0000 (Central European Standard Time)",
UTCString: "Tue, 01 Jan 1935 00:00:00 GMT",
});
}

{
let local = new DateTime.Local(1935, Month.July, 1, DayOfWeek.Monday, 0, 0, 0);
let utc = new DateTime.UTC(1935, Month.June, 30, DayOfWeek.Sunday, 22, 40, 28);
let utc = new DateTime.UTC(1935, Month.June, 30, DayOfWeek.Sunday, 23, 0, 0);

assertDate(local, utc, TimeZone(+1,19,32), {
String: "Mon Jul 01 1935 00:00:00 GMT+0119 (Central European Summer Time)",
UTCString: "Sun, 30 Jun 1935 22:40:28 GMT",
assertDate(local, utc, TimeZone(+1,0,0), {
String: "Mon Jul 01 1935 00:00:00 GMT+0100 (Central European Summer Time)",
UTCString: "Sun, 30 Jun 1935 23:00:00 GMT",
});
}
});

// Use America/St_Johns as a replacement for the Europe/Amsterdam test case.
//
// Zone America/St_Johns as an example for mean time like timezones after LMT (NST, NDT).

inTimeZone("America/St_Johns", () => {
{
let local = new DateTime.Local(1917, Month.January, 1, DayOfWeek.Monday, 0, 0, 0);
let utc = new DateTime.UTC(1917, Month.January, 1, DayOfWeek.Monday, 3, 30, 52);

assertDate(local, utc, TimeZone(-3,30,52), {
String: "Mon Jan 01 1917 00:00:00 GMT-0330 (Newfoundland Standard Time)",
UTCString: "Mon, 01 Jan 1917 03:30:52 GMT",
});
}

{
let local = new DateTime.Local(1917, Month.July, 1, DayOfWeek.Sunday, 0, 0, 0);
let utc = new DateTime.UTC(1917, Month.July, 1, DayOfWeek.Sunday, 2, 30, 52);

assertDate(local, utc, TimeZone(-2,30,52), {
String: "Sun Jul 01 1917 00:00:00 GMT-0230 (Newfoundland Daylight Time)",
UTCString: "Sun, 01 Jul 1917 02:30:52 GMT",
});
}
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// |reftest| skip-if(!this.hasOwnProperty("Intl"))

// Generated by make_intl_data.py. DO NOT EDIT.
// tzdata version = 2022a
// tzdata version = 2022b

const tzMapper = [
x => x,
Expand Down Expand Up @@ -69,6 +69,7 @@ const links = {
"Egypt": "Africa/Cairo",
"Eire": "Europe/Dublin",
"Etc/UCT": "Etc/UTC",
"Europe/Kiev": "Europe/Kyiv",
"GB": "Europe/London",
"GB-Eire": "Europe/London",
"GMT+0": "Etc/GMT",
Expand Down
23 changes: 22 additions & 1 deletion js/src/tests/non262/Intl/DateTimeFormat/timeZone_backzone.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// |reftest| skip-if(!this.hasOwnProperty("Intl"))

// Generated by make_intl_data.py. DO NOT EDIT.
// tzdata version = 2022a
// tzdata version = 2022b

const tzMapper = [
x => x,
Expand Down Expand Up @@ -76,36 +76,57 @@ const links = {
"Antarctica/DumontDUrville": "Antarctica/DumontDUrville",
"Antarctica/McMurdo": "Antarctica/McMurdo",
"Antarctica/Syowa": "Antarctica/Syowa",
"Antarctica/Vostok": "Antarctica/Vostok",
"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",
"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/Vaduz": "Europe/Vaduz",
"Europe/Zagreb": "Europe/Zagreb",
"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",
"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",
};

for (let [linkName, target] of Object.entries(links)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// |reftest| skip-if(!this.hasOwnProperty("Intl"))

// Generated by make_intl_data.py. DO NOT EDIT.
// tzdata version = 2022a
// tzdata version = 2022b

const tzMapper = [
x => x,
Expand All @@ -23,7 +23,12 @@ const links = {
"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)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// |reftest| skip-if(!this.hasOwnProperty("Intl"))

// Generated by make_intl_data.py. DO NOT EDIT.
// tzdata version = 2022a
// tzdata version = 2022b

const tzMapper = [
x => x,
Expand Down
4 changes: 2 additions & 2 deletions js/src/tests/non262/Intl/DateTimeFormat/timeZone_version.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// |reftest| skip-if(!this.hasOwnProperty("Intl"))

// Generated by make_intl_data.py. DO NOT EDIT.
// tzdata version = 2022a
const tzdata = "2022a";
// tzdata version = 2022b
const tzdata = "2022b";

if (typeof getICUOptions === "undefined") {
var getICUOptions = SpecialPowers.Cu.getJSTestingFunctions().getICUOptions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// |reftest| skip-if(!this.hasOwnProperty("Intl"))

// Generated by make_intl_data.py. DO NOT EDIT.
// tzdata version = 2022a
// tzdata version = 2022b

// This file was generated with historical, pre-1970 backzone information
// respected.
Expand Down Expand Up @@ -380,8 +380,8 @@ const zones = [
"Europe/Istanbul",
"Europe/Jersey",
"Europe/Kaliningrad",
"Europe/Kiev",
"Europe/Kirov",
"Europe/Kyiv",
"Europe/Lisbon",
"Europe/Ljubljana",
"Europe/London",
Expand Down

0 comments on commit 52aed99

Please sign in to comment.