-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework the Windows timezone implementation #390
Conversation
@@ -152,33 +152,28 @@ internal val standardToWindows: Map<String, String> = mutableMapOf( | |||
"America/Moncton" to "Atlantic Standard Time", | |||
"America/Monterrey" to "Central Standard Time (Mexico)", | |||
"America/Montevideo" to "Montevideo Standard Time", | |||
"America/Montreal" to "Eastern Standard Time", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What caused these removals? Is it no longer a valid time zone?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sort of. In the IANA tzdb, the zone.tab
file is a list of valid timezones, and, for example, America/Montreal
isn't there. We don't take zone.tab
into account on the other platforms, and Oracle OpenJDK 22 still thinks there's an America/Montreal
and lists it in the list of available time zones. At some point, the CLDR removed some of such zones that are preserved in the IANA tzdb as symlinks for backward compatibility: unicode-org/cldr#3442
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zone.tab
doesn't include America/Montreal
since 2013: https://mm.icann.org/pipermail/tz-announce/2013-September/000013.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List of zones on the MacOS filesystem but not in the Windows zone name mapping:
Put it under a spoiler, as there's many of them
Africa/Asmara
Africa/Timbuktu
America/Argentina/Buenos_Aires
America/Argentina/Catamarca
America/Argentina/ComodRivadavia
America/Argentina/Cordoba
America/Argentina/Jujuy
America/Argentina/Mendoza
America/Atikokan
America/Atka
America/Ensenada
America/Fort_Wayne
America/Indiana/Indianapolis
America/Kentucky/Louisville
America/Knox_IN
America/Montreal
America/Nipigon
America/Nuuk
America/Pangnirtung
America/Porto_Acre
America/Rainy_River
America/Rosario
America/Santa_Isabel
America/Shiprock
America/Thunder_Bay
America/Virgin
America/Yellowknife
Antarctica/South_Pole
Antarctica/Troll
Asia/Ashkhabad
Asia/Chongqing
Asia/Chungking
Asia/Dacca
Asia/Harbin
Asia/Ho_Chi_Minh
Asia/Istanbul
Asia/Kashgar
Asia/Kathmandu
Asia/Kolkata
Asia/Macao
Asia/Tel_Aviv
Asia/Thimbu
Asia/Ujung_Pandang
Asia/Ulan_Bator
Asia/Yangon
Atlantic/Faroe
Atlantic/Jan_Mayen
Australia/ACT
Australia/Canberra
Australia/Currie
Australia/LHI
Australia/NSW
Australia/North
Australia/Queensland
Australia/South
Australia/Tasmania
Australia/Victoria
Australia/West
Australia/Yancowinna
Brazil/Acre
Brazil/DeNoronha
Brazil/East
Brazil/West
CET
Canada/Atlantic
Canada/Central
Canada/Eastern
Canada/Mountain
Canada/Newfoundland
Canada/Pacific
Canada/Saskatchewan
Canada/Yukon
Chile
Chile/Continental
Chile/EasterIsland
EET
Eire
Etc/GMT+0
Etc/GMT-0
Etc/GMT0
Etc/Greenwich
Etc/UCT
Etc/Universal
Etc/Zulu
Europe/Belfast
Europe/Kyiv
Europe/Nicosia
Europe/Tiraspol
Europe/Uzhgorod
Europe/Zaporozhye
GB
GB-Eire
GMT+0
GMT-0
GMT0
HST
Hongkong
Iceland
Japan
MET
Mexico/BajaNorte
Mexico/BajaSur
Mexico/General
NZ
NZ-CHAT
Navajo
PRC
Pacific/Chuuk
Pacific/Johnston
Pacific/Kanton
Pacific/Pohnpei
Pacific/Samoa
Pacific/Yap
Poland
Portugal
ROC
ROK
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
Universal
W-SU
WET
Zulu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I get right that America/Montreal
for example is now an alias to some other zone name, for which we have a mapping?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's America/Toronto
: https://github.com/eggert/tz/blob/7748036bace8562b9c047f368c8eba5f35e8c4b4/backward#L276
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so if we can get these link mappings, we could allow obtaining zones by these link names from TimeZone.of
without listing them in availableZoneIds
. But I think this should be a separate PR.
This should lower the memory consumption during startup.
Fix the inconsistencies that were discovered.
019a06d
to
744ed9d
Compare
23:59:59.999
, whereas we can express24:00:00.000
, the value that was actually intended.