The following C# code
TimeZoneInfo.FindSystemTimeZoneById("foo")
will throw a TimeZoneNotFoundException (as you might expect), whereas
TimeZoneInfo.FindSystemTimeZoneById("Central European Standard Time")
correctly returns a TimeZoneInfo object for central Europe.
This is a slightly paranoid question, but does the .NET Framework guarantee that the same TimeZoneInfo instances are available on all instances of a .NET version? Do they vary by version?
This is based on the time zone information stored on the system itself, and is not part of the framework. From the documentation for FindSystemTimeZoneById:
Basically, if you’re using a time zone defined in Windows by default, it should be safe – but it is based on the system itself, not the framework.