Bug 19523 - TimeZoneInfo.FindSystemTimeZoneById "W. Europe Standard Time"
Summary: TimeZoneInfo.FindSystemTimeZoneById "W. Europe Standard Time"
Status: RESOLVED ANSWERED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System ()
Version: master
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-05-05 09:10 UTC by henrik
Modified: 2017-04-26 12:17 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description henrik 2014-05-05 09:10:05 UTC
Calling TimeZoneInfo.FindSystemTimeZoneById "W. Europe Standard Time":

> TimeZoneInfo.FindSystemTimeZoneById "W. Europe Standard Time";;
System.TimeZoneNotFoundException: Exception of type 'System.TimeZoneNotFoundException' was thrown.
  at System.TimeZoneInfo.FindSystemTimeZoneByFileName (System.String id, System.String filepath) [0x00000] in <filename unknown>:0 
  at System.TimeZoneInfo.FindSystemTimeZoneById (System.String id) [0x00000] in <filename unknown>:0 
  at <StartupCode$FSI_0006>.$FSI_0006.main@ () [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 

Stopped due to error

OS X, 10.8.5
Mono 3.4.0
Comment 1 henrik 2014-05-05 09:20:55 UTC
Same on CentOS 6.5 x64.

I haven't tried on Windows. Example above running in 'fsharpi'.
Comment 2 henrik 2014-08-25 16:01:53 UTC
Same on Mono 3.6 OS X.
Comment 3 henrik 2015-07-28 12:28:42 UTC
Any updates?
Comment 4 Alexander Köplinger [MSFT] 2017-04-26 12:17:02 UTC
This API works based off of the system time zone IDs. On Windows they have the forms of "W. Europe Standard Time" or "Pacific Standard Time".

On Linux/Mac the systems use a different format, based on the tz database. They have the form of "Europe/Berlin" or "US/Hawaii".

Using the Windows format on Linux/Mac or vice versa is not possible since we simply ask the system for what time zone IDs it supports. You can find the list of supported ones via "TimeZoneInfo.GetSystemTimeZones()"