[corlib] Fixed build with NET_2_1 define.
authorJoão Matos <joao@tritao.eu>
Mon, 2 Feb 2015 15:51:50 +0000 (15:51 +0000)
committerJoão Matos <joao@tritao.eu>
Mon, 2 Feb 2015 15:51:50 +0000 (15:51 +0000)
mcs/class/corlib/System/TimeZoneInfo.cs

index a6a3c1a106ff111f699df14b2bc609b26202b32a..8a54529e214be4a85397f2b93fa329c13ee23bff 100644 (file)
@@ -108,12 +108,14 @@ namespace System
                                return BuildFromStream ("Local", stream);
                        }
 #else
+#if !NET_2_1
                        if (IsWindows && LocalZoneKey != null) {
                                string name = (string)LocalZoneKey.GetValue ("TimeZoneKeyName");
                                name = TrimSpecial (name);
                                if (name != null)
                                        return TimeZoneInfo.FindSystemTimeZoneById (name);
                        }
+#endif
 
                        var tz = Environment.GetEnvironmentVariable ("TZ");
                        if (tz != null) {