summaryrefslogtreecommitdiff
path: root/absl/time
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2023-09-23 08:47:36 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-09-23 08:51:27 -0700
commitd53ca3be7de2f6317c4d047d053c36a44cfc28ef (patch)
treeb7bbba7f41dec88350c05bce0f90877b185a89dc /absl/time
parent1ad22093098d0b577ea37603f8b4a6d4b2ea3e3a (diff)
Import of CCTZ from GitHub.
PiperOrigin-RevId: 567869792 Change-Id: I29948282b57b401f3199dc41160538aa9a8079a7
Diffstat (limited to 'absl/time')
-rw-r--r--absl/time/internal/cctz/src/cctz_benchmark.cc113
-rw-r--r--absl/time/internal/cctz/src/time_zone_lookup_test.cc112
2 files changed, 1 insertions, 224 deletions
diff --git a/absl/time/internal/cctz/src/cctz_benchmark.cc b/absl/time/internal/cctz/src/cctz_benchmark.cc
index c64f3801..11f9ba6c 100644
--- a/absl/time/internal/cctz/src/cctz_benchmark.cc
+++ b/absl/time/internal/cctz/src/cctz_benchmark.cc
@@ -110,7 +110,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Africa/Addis_Ababa",
"Africa/Algiers",
"Africa/Asmara",
- "Africa/Asmera",
"Africa/Bamako",
"Africa/Bangui",
"Africa/Banjul",
@@ -166,7 +165,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"America/Araguaina",
"America/Argentina/Buenos_Aires",
"America/Argentina/Catamarca",
- "America/Argentina/ComodRivadavia",
"America/Argentina/Cordoba",
"America/Argentina/Jujuy",
"America/Argentina/La_Rioja",
@@ -190,18 +188,16 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"America/Boa_Vista",
"America/Bogota",
"America/Boise",
- "America/Buenos_Aires",
"America/Cambridge_Bay",
"America/Campo_Grande",
"America/Cancun",
"America/Caracas",
- "America/Catamarca",
"America/Cayenne",
"America/Cayman",
"America/Chicago",
"America/Chihuahua",
+ "America/Ciudad_Juarez",
"America/Coral_Harbour",
- "America/Cordoba",
"America/Costa_Rica",
"America/Creston",
"America/Cuiaba",
@@ -217,7 +213,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"America/El_Salvador",
"America/Ensenada",
"America/Fort_Nelson",
- "America/Fort_Wayne",
"America/Fortaleza",
"America/Glace_Bay",
"America/Godthab",
@@ -239,20 +234,16 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"America/Indiana/Vevay",
"America/Indiana/Vincennes",
"America/Indiana/Winamac",
- "America/Indianapolis",
"America/Inuvik",
"America/Iqaluit",
"America/Jamaica",
- "America/Jujuy",
"America/Juneau",
"America/Kentucky/Louisville",
"America/Kentucky/Monticello",
- "America/Knox_IN",
"America/Kralendijk",
"America/La_Paz",
"America/Lima",
"America/Los_Angeles",
- "America/Louisville",
"America/Lower_Princes",
"America/Maceio",
"America/Managua",
@@ -261,7 +252,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"America/Martinique",
"America/Matamoros",
"America/Mazatlan",
- "America/Mendoza",
"America/Menominee",
"America/Merida",
"America/Metlakatla",
@@ -298,7 +288,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"America/Regina",
"America/Resolute",
"America/Rio_Branco",
- "America/Rosario",
"America/Santa_Isabel",
"America/Santarem",
"America/Santiago",
@@ -334,7 +323,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Antarctica/McMurdo",
"Antarctica/Palmer",
"Antarctica/Rothera",
- "Antarctica/South_Pole",
"Antarctica/Syowa",
"Antarctica/Troll",
"Antarctica/Vostok",
@@ -346,7 +334,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Asia/Aqtau",
"Asia/Aqtobe",
"Asia/Ashgabat",
- "Asia/Ashkhabad",
"Asia/Atyrau",
"Asia/Baghdad",
"Asia/Bahrain",
@@ -356,13 +343,10 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Asia/Beirut",
"Asia/Bishkek",
"Asia/Brunei",
- "Asia/Calcutta",
"Asia/Chita",
"Asia/Choibalsan",
"Asia/Chongqing",
- "Asia/Chungking",
"Asia/Colombo",
- "Asia/Dacca",
"Asia/Damascus",
"Asia/Dhaka",
"Asia/Dili",
@@ -385,14 +369,12 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Asia/Karachi",
"Asia/Kashgar",
"Asia/Kathmandu",
- "Asia/Katmandu",
"Asia/Khandyga",
"Asia/Kolkata",
"Asia/Krasnoyarsk",
"Asia/Kuala_Lumpur",
"Asia/Kuching",
"Asia/Kuwait",
- "Asia/Macao",
"Asia/Macau",
"Asia/Magadan",
"Asia/Makassar",
@@ -409,9 +391,7 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Asia/Qatar",
"Asia/Qostanay",
"Asia/Qyzylorda",
- "Asia/Rangoon",
"Asia/Riyadh",
- "Asia/Saigon",
"Asia/Sakhalin",
"Asia/Samarkand",
"Asia/Seoul",
@@ -423,13 +403,10 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Asia/Tbilisi",
"Asia/Tehran",
"Asia/Tel_Aviv",
- "Asia/Thimbu",
"Asia/Thimphu",
"Asia/Tokyo",
"Asia/Tomsk",
- "Asia/Ujung_Pandang",
"Asia/Ulaanbaatar",
- "Asia/Ulan_Bator",
"Asia/Urumqi",
"Asia/Ust-Nera",
"Asia/Vientiane",
@@ -442,7 +419,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Atlantic/Bermuda",
"Atlantic/Canary",
"Atlantic/Cape_Verde",
- "Atlantic/Faeroe",
"Atlantic/Faroe",
"Atlantic/Jan_Mayen",
"Atlantic/Madeira",
@@ -450,7 +426,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Atlantic/South_Georgia",
"Atlantic/St_Helena",
"Atlantic/Stanley",
- "Australia/ACT",
"Australia/Adelaide",
"Australia/Brisbane",
"Australia/Broken_Hill",
@@ -459,42 +434,12 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Australia/Darwin",
"Australia/Eucla",
"Australia/Hobart",
- "Australia/LHI",
"Australia/Lindeman",
"Australia/Lord_Howe",
"Australia/Melbourne",
- "Australia/NSW",
- "Australia/North",
"Australia/Perth",
- "Australia/Queensland",
- "Australia/South",
"Australia/Sydney",
- "Australia/Tasmania",
- "Australia/Victoria",
- "Australia/West",
"Australia/Yancowinna",
- "Brazil/Acre",
- "Brazil/DeNoronha",
- "Brazil/East",
- "Brazil/West",
- "CET",
- "CST6CDT",
- "Canada/Atlantic",
- "Canada/Central",
- "Canada/Eastern",
- "Canada/Mountain",
- "Canada/Newfoundland",
- "Canada/Pacific",
- "Canada/Saskatchewan",
- "Canada/Yukon",
- "Chile/Continental",
- "Chile/EasterIsland",
- "Cuba",
- "EET",
- "EST",
- "EST5EDT",
- "Egypt",
- "Eire",
"Etc/GMT",
"Etc/GMT+0",
"Etc/GMT+1",
@@ -552,7 +497,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Europe/Istanbul",
"Europe/Jersey",
"Europe/Kaliningrad",
- "Europe/Kiev",
"Europe/Kirov",
"Europe/Kyiv",
"Europe/Lisbon",
@@ -584,7 +528,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Europe/Tirane",
"Europe/Tiraspol",
"Europe/Ulyanovsk",
- "Europe/Uzhgorod",
"Europe/Vaduz",
"Europe/Vatican",
"Europe/Vienna",
@@ -592,19 +535,8 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Europe/Volgograd",
"Europe/Warsaw",
"Europe/Zagreb",
- "Europe/Zaporozhye",
"Europe/Zurich",
"Factory",
- "GB",
- "GB-Eire",
- "GMT",
- "GMT+0",
- "GMT-0",
- "GMT0",
- "Greenwich",
- "HST",
- "Hongkong",
- "Iceland",
"Indian/Antananarivo",
"Indian/Chagos",
"Indian/Christmas",
@@ -616,23 +548,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Indian/Mauritius",
"Indian/Mayotte",
"Indian/Reunion",
- "Iran",
- "Israel",
- "Jamaica",
- "Japan",
- "Kwajalein",
- "Libya",
- "MET",
- "MST",
- "MST7MDT",
- "Mexico/BajaNorte",
- "Mexico/BajaSur",
- "Mexico/General",
- "NZ",
- "NZ-CHAT",
- "Navajo",
- "PRC",
- "PST8PDT",
"Pacific/Apia",
"Pacific/Auckland",
"Pacific/Bougainville",
@@ -640,7 +555,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Pacific/Chuuk",
"Pacific/Easter",
"Pacific/Efate",
- "Pacific/Enderbury",
"Pacific/Fakaofo",
"Pacific/Fiji",
"Pacific/Funafuti",
@@ -665,7 +579,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Pacific/Palau",
"Pacific/Pitcairn",
"Pacific/Pohnpei",
- "Pacific/Ponape",
"Pacific/Port_Moresby",
"Pacific/Rarotonga",
"Pacific/Saipan",
@@ -673,34 +586,10 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Pacific/Tahiti",
"Pacific/Tarawa",
"Pacific/Tongatapu",
- "Pacific/Truk",
"Pacific/Wake",
"Pacific/Wallis",
"Pacific/Yap",
- "Poland",
- "Portugal",
- "ROC",
- "ROK",
- "Singapore",
- "Turkey",
- "UCT",
- "US/Alaska",
- "US/Aleutian",
- "US/Arizona",
- "US/Central",
- "US/East-Indiana",
- "US/Eastern",
- "US/Hawaii",
- "US/Indiana-Starke",
- "US/Michigan",
- "US/Mountain",
- "US/Pacific",
- "US/Samoa",
"UTC",
- "Universal",
- "W-SU",
- "WET",
- "Zulu",
nullptr};
std::vector<std::string> AllTimeZoneNames() {
diff --git a/absl/time/internal/cctz/src/time_zone_lookup_test.cc b/absl/time/internal/cctz/src/time_zone_lookup_test.cc
index 4884c32e..6f7e5cfe 100644
--- a/absl/time/internal/cctz/src/time_zone_lookup_test.cc
+++ b/absl/time/internal/cctz/src/time_zone_lookup_test.cc
@@ -45,7 +45,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Africa/Addis_Ababa",
"Africa/Algiers",
"Africa/Asmara",
- "Africa/Asmera",
"Africa/Bamako",
"Africa/Bangui",
"Africa/Banjul",
@@ -101,7 +100,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"America/Araguaina",
"America/Argentina/Buenos_Aires",
"America/Argentina/Catamarca",
- "America/Argentina/ComodRivadavia",
"America/Argentina/Cordoba",
"America/Argentina/Jujuy",
"America/Argentina/La_Rioja",
@@ -125,19 +123,16 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"America/Boa_Vista",
"America/Bogota",
"America/Boise",
- "America/Buenos_Aires",
"America/Cambridge_Bay",
"America/Campo_Grande",
"America/Cancun",
"America/Caracas",
- "America/Catamarca",
"America/Cayenne",
"America/Cayman",
"America/Chicago",
"America/Chihuahua",
"America/Ciudad_Juarez",
"America/Coral_Harbour",
- "America/Cordoba",
"America/Costa_Rica",
"America/Creston",
"America/Cuiaba",
@@ -153,7 +148,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"America/El_Salvador",
"America/Ensenada",
"America/Fort_Nelson",
- "America/Fort_Wayne",
"America/Fortaleza",
"America/Glace_Bay",
"America/Godthab",
@@ -175,20 +169,16 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"America/Indiana/Vevay",
"America/Indiana/Vincennes",
"America/Indiana/Winamac",
- "America/Indianapolis",
"America/Inuvik",
"America/Iqaluit",
"America/Jamaica",
- "America/Jujuy",
"America/Juneau",
"America/Kentucky/Louisville",
"America/Kentucky/Monticello",
- "America/Knox_IN",
"America/Kralendijk",
"America/La_Paz",
"America/Lima",
"America/Los_Angeles",
- "America/Louisville",
"America/Lower_Princes",
"America/Maceio",
"America/Managua",
@@ -197,7 +187,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"America/Martinique",
"America/Matamoros",
"America/Mazatlan",
- "America/Mendoza",
"America/Menominee",
"America/Merida",
"America/Metlakatla",
@@ -234,7 +223,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"America/Regina",
"America/Resolute",
"America/Rio_Branco",
- "America/Rosario",
"America/Santa_Isabel",
"America/Santarem",
"America/Santiago",
@@ -270,7 +258,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Antarctica/McMurdo",
"Antarctica/Palmer",
"Antarctica/Rothera",
- "Antarctica/South_Pole",
"Antarctica/Syowa",
"Antarctica/Troll",
"Antarctica/Vostok",
@@ -282,7 +269,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Asia/Aqtau",
"Asia/Aqtobe",
"Asia/Ashgabat",
- "Asia/Ashkhabad",
"Asia/Atyrau",
"Asia/Baghdad",
"Asia/Bahrain",
@@ -292,13 +278,10 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Asia/Beirut",
"Asia/Bishkek",
"Asia/Brunei",
- "Asia/Calcutta",
"Asia/Chita",
"Asia/Choibalsan",
"Asia/Chongqing",
- "Asia/Chungking",
"Asia/Colombo",
- "Asia/Dacca",
"Asia/Damascus",
"Asia/Dhaka",
"Asia/Dili",
@@ -321,14 +304,12 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Asia/Karachi",
"Asia/Kashgar",
"Asia/Kathmandu",
- "Asia/Katmandu",
"Asia/Khandyga",
"Asia/Kolkata",
"Asia/Krasnoyarsk",
"Asia/Kuala_Lumpur",
"Asia/Kuching",
"Asia/Kuwait",
- "Asia/Macao",
"Asia/Macau",
"Asia/Magadan",
"Asia/Makassar",
@@ -345,9 +326,7 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Asia/Qatar",
"Asia/Qostanay",
"Asia/Qyzylorda",
- "Asia/Rangoon",
"Asia/Riyadh",
- "Asia/Saigon",
"Asia/Sakhalin",
"Asia/Samarkand",
"Asia/Seoul",
@@ -359,13 +338,10 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Asia/Tbilisi",
"Asia/Tehran",
"Asia/Tel_Aviv",
- "Asia/Thimbu",
"Asia/Thimphu",
"Asia/Tokyo",
"Asia/Tomsk",
- "Asia/Ujung_Pandang",
"Asia/Ulaanbaatar",
- "Asia/Ulan_Bator",
"Asia/Urumqi",
"Asia/Ust-Nera",
"Asia/Vientiane",
@@ -378,7 +354,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Atlantic/Bermuda",
"Atlantic/Canary",
"Atlantic/Cape_Verde",
- "Atlantic/Faeroe",
"Atlantic/Faroe",
"Atlantic/Jan_Mayen",
"Atlantic/Madeira",
@@ -386,7 +361,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Atlantic/South_Georgia",
"Atlantic/St_Helena",
"Atlantic/Stanley",
- "Australia/ACT",
"Australia/Adelaide",
"Australia/Brisbane",
"Australia/Broken_Hill",
@@ -395,42 +369,12 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Australia/Darwin",
"Australia/Eucla",
"Australia/Hobart",
- "Australia/LHI",
"Australia/Lindeman",
"Australia/Lord_Howe",
"Australia/Melbourne",
- "Australia/NSW",
- "Australia/North",
"Australia/Perth",
- "Australia/Queensland",
- "Australia/South",
"Australia/Sydney",
- "Australia/Tasmania",
- "Australia/Victoria",
- "Australia/West",
"Australia/Yancowinna",
- "Brazil/Acre",
- "Brazil/DeNoronha",
- "Brazil/East",
- "Brazil/West",
- "CET",
- "CST6CDT",
- "Canada/Atlantic",
- "Canada/Central",
- "Canada/Eastern",
- "Canada/Mountain",
- "Canada/Newfoundland",
- "Canada/Pacific",
- "Canada/Saskatchewan",
- "Canada/Yukon",
- "Chile/Continental",
- "Chile/EasterIsland",
- "Cuba",
- "EET",
- "EST",
- "EST5EDT",
- "Egypt",
- "Eire",
"Etc/GMT",
"Etc/GMT+0",
"Etc/GMT+1",
@@ -488,7 +432,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Europe/Istanbul",
"Europe/Jersey",
"Europe/Kaliningrad",
- "Europe/Kiev",
"Europe/Kirov",
"Europe/Kyiv",
"Europe/Lisbon",
@@ -520,7 +463,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Europe/Tirane",
"Europe/Tiraspol",
"Europe/Ulyanovsk",
- "Europe/Uzhgorod",
"Europe/Vaduz",
"Europe/Vatican",
"Europe/Vienna",
@@ -528,19 +470,8 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Europe/Volgograd",
"Europe/Warsaw",
"Europe/Zagreb",
- "Europe/Zaporozhye",
"Europe/Zurich",
"Factory",
- "GB",
- "GB-Eire",
- "GMT",
- "GMT+0",
- "GMT-0",
- "GMT0",
- "Greenwich",
- "HST",
- "Hongkong",
- "Iceland",
"Indian/Antananarivo",
"Indian/Chagos",
"Indian/Christmas",
@@ -552,23 +483,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Indian/Mauritius",
"Indian/Mayotte",
"Indian/Reunion",
- "Iran",
- "Israel",
- "Jamaica",
- "Japan",
- "Kwajalein",
- "Libya",
- "MET",
- "MST",
- "MST7MDT",
- "Mexico/BajaNorte",
- "Mexico/BajaSur",
- "Mexico/General",
- "NZ",
- "NZ-CHAT",
- "Navajo",
- "PRC",
- "PST8PDT",
"Pacific/Apia",
"Pacific/Auckland",
"Pacific/Bougainville",
@@ -576,7 +490,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Pacific/Chuuk",
"Pacific/Easter",
"Pacific/Efate",
- "Pacific/Enderbury",
"Pacific/Fakaofo",
"Pacific/Fiji",
"Pacific/Funafuti",
@@ -601,7 +514,6 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Pacific/Palau",
"Pacific/Pitcairn",
"Pacific/Pohnpei",
- "Pacific/Ponape",
"Pacific/Port_Moresby",
"Pacific/Rarotonga",
"Pacific/Saipan",
@@ -609,34 +521,10 @@ const char* const kTimeZoneNames[] = {"Africa/Abidjan",
"Pacific/Tahiti",
"Pacific/Tarawa",
"Pacific/Tongatapu",
- "Pacific/Truk",
"Pacific/Wake",
"Pacific/Wallis",
"Pacific/Yap",
- "Poland",
- "Portugal",
- "ROC",
- "ROK",
- "Singapore",
- "Turkey",
- "UCT",
- "US/Alaska",
- "US/Aleutian",
- "US/Arizona",
- "US/Central",
- "US/East-Indiana",
- "US/Eastern",
- "US/Hawaii",
- "US/Indiana-Starke",
- "US/Michigan",
- "US/Mountain",
- "US/Pacific",
- "US/Samoa",
"UTC",
- "Universal",
- "W-SU",
- "WET",
- "Zulu",
nullptr};
// Helper to return a loaded time zone by value (UTC on error).