From: myrup Date: Thu, 19 Mar 2015 23:39:19 +0000 (+0100) Subject: Fixed TimeZoneInfo.Local on windows xp X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=9abf43e02aea7c59e8a979cf3c575f419d671753;p=mono.git Fixed TimeZoneInfo.Local on windows xp Fall back to “StandardName” subkey when “TimeZoneKeyName” isn’t present. --- diff --git a/mcs/class/corlib/System/TimeZoneInfo.cs b/mcs/class/corlib/System/TimeZoneInfo.cs index 5562b8bf49e..91edf5d1041 100644 --- a/mcs/class/corlib/System/TimeZoneInfo.cs +++ b/mcs/class/corlib/System/TimeZoneInfo.cs @@ -112,6 +112,8 @@ namespace System #if !NET_2_1 if (IsWindows && LocalZoneKey != null) { string name = (string)LocalZoneKey.GetValue ("TimeZoneKeyName"); + if (name == null) + name = (string)LocalZoneKey.GetValue ("StandardName"); // windows xp name = TrimSpecial (name); if (name != null) return TimeZoneInfo.FindSystemTimeZoneById (name);