-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[WASM] TimeZoneInfo UTC display names #50305
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsI am reminded of something I should have brought with #48931, but need feedback before submitting a PR. With the browser (or whenever we don't have full ICU), most time zones will get their However - for This all works fine, but when iterating a list of time zones from My question is - do we want that behavior? Or should UTC use the same format as all the other zones for the browser (and others where ICU time zone names aren't available)?
|
It doesn't sound that hard to make this consistent on |
It's not difficult at all, no. I just wasn't sure whether it was more important to match the other platforms or to match the other string formats of this platform. Sounds like the latter is preferred. I'll send a PR at some point. |
I am reminded of something I should have brought with #48931, but need feedback before submitting a PR.
With the browser (or whenever we don't have full ICU), most time zones will get their
StandardName
andDaylightName
from the IANA time zone abbreviations (example:"PST"
,"PDT"
), and theirDisplayName
will be the base offset plus the IANA time zone ID (example:"(UTC-08:00) America/Los_Angeles"
).However - for
UTC
and its aliases (Etc/UTC
, and others), we have the hardcoded invariant string"Coordinated Universal Time"
, which we use for both theStandardName
andDaylightName
, and we use that to build"(UTC) Coordinated Universal Time"
for theDisplayName
. These strings are the same across platforms as a fallback value when globalization data is not available or when in invariant mode or usingCultureInfo.InvariantCulture
, etc.This all works fine, but when iterating a list of time zones from
GetSystemTimeZones
with the browser target, all will be of the same format except UTC which will stand out.My question is - do we want that behavior? Or should UTC use the same format as all the other zones for the browser (and others where ICU time zone names aren't available)? In other words, should the
StandardName
andDaylightName
be"UTC"
and the display name be"(UTC) Etc/UTC"
?@tarekgh @lewing @eerhardt
The text was updated successfully, but these errors were encountered: