Fixed TimeZoneInfo.Local windows xp issue
authormyrup <github@myl.dk>
Fri, 20 Mar 2015 09:50:43 +0000 (10:50 +0100)
committermyrup <github@myl.dk>
Fri, 20 Mar 2015 09:50:43 +0000 (10:50 +0100)
Windows xp StandardName property has an exception when system time is UTC.

mcs/class/corlib/System/TimeZoneInfo.cs

index f6f8285bbf75059d31debf865c0332446836a3d1..d2b5f6668027a018a5c8cf3e4f59ad189e0322c0 100644 (file)
@@ -435,6 +435,8 @@ namespace System
 #if !NET_2_1
                        if (TimeZoneKey != null)
                        {
+                               if (id == "Coordinated Universal Time")
+                                       id = "UTC"; //windows xp exception for "StandardName" property
                                RegistryKey key = TimeZoneKey.OpenSubKey (id, false);
                                if (key == null)
                                        throw new TimeZoneNotFoundException ();