-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
TimeZoneInfo.HasIanaId returning false for an IANA timezone on Linux #58326
Comments
Tagging subscribers to this area: @tarekgh, @safern Issue DetailsRunning on Ubuntu 21.04, dotnet SDK 6.0.100-rc.1.21379.2, TimeZoneInfo.HasIanaId is unexpectedly returning false. System timezone information:
Based on the sample GetIanaTimeZoneId method in this blog article: Console.WriteLine(TimeZoneInfo.Local); // (UTC+01:00) Central European Time (Berlin)
Console.WriteLine(TimeZoneInfo.Local.Id); // Europe/Berlin
Console.WriteLine(TimeZoneInfo.Local.HasIanaId); // false
if (!TimeZoneInfo.TryConvertWindowsIdToIanaId(TimeZoneInfo.Local.Id, out _))
Console.WriteLine($"Could not convert '{TimeZoneInfo.Local.Id}'"); // Could not convert 'Europe/Berlin'
|
Tagging subscribers to this area: @dotnet/area-system-runtime Issue DetailsRunning on Ubuntu 21.04, dotnet SDK 6.0.100-rc.1.21379.2, TimeZoneInfo.HasIanaId is unexpectedly returning false. System timezone information:
Based on the sample GetIanaTimeZoneId method in this blog article: Console.WriteLine(TimeZoneInfo.Local); // (UTC+01:00) Central European Time (Berlin)
Console.WriteLine(TimeZoneInfo.Local.Id); // Europe/Berlin
Console.WriteLine(TimeZoneInfo.Local.HasIanaId); // false
if (!TimeZoneInfo.TryConvertWindowsIdToIanaId(TimeZoneInfo.Local.Id, out _))
Console.WriteLine($"Could not convert '{TimeZoneInfo.Local.Id}'"); // Could not convert 'Europe/Berlin'
|
Thanks for the quick turnaround @tarekgh, happy this got fixed for 6.0! Will let you know if I run into anything else. |
Running on Ubuntu 21.04, dotnet SDK 6.0.100-rc.1.21379.2, TimeZoneInfo.HasIanaId is unexpectedly returning false.
System timezone information:
Based on the sample GetIanaTimeZoneId method in this blog article:
The text was updated successfully, but these errors were encountered: