another try to pass the tests
authorStephane Delcroix <stephane@mono-cvs.ximian.com>
Mon, 12 Nov 2007 12:21:03 +0000 (12:21 -0000)
committerStephane Delcroix <stephane@mono-cvs.ximian.com>
Mon, 12 Nov 2007 12:21:03 +0000 (12:21 -0000)
svn path=/trunk/mcs/; revision=89457

mcs/class/corlib/Test/System/TimeZoneTest.cs

index f26785063a5c55e4b499f9ae4ec09592db5872db..0531c9e8edba1846d16cd8905b8903e01cead5a9 100644 (file)
@@ -256,6 +256,8 @@ public class TimeZoneTest : TestCase {
                TimeZone tz = TimeZone.CurrentTimeZone;
                DateTime dst_start_utc = tz.GetDaylightChanges(2007).Start.ToUniversalTime ();
 
+               if (dst_start_utc == DateTime.MinValue)
+                       return;
                Assert ("0:1:59 < 0:3:00", tz.ToLocalTime (dst_start_utc.Subtract (new TimeSpan (0, 1, 0))) < tz.ToLocalTime (dst_start_utc));
                Assert ("0:3:00 < 0:3:01", tz.ToLocalTime (dst_start_utc) < tz.ToLocalTime (dst_start_utc.Add (new TimeSpan (0, 1, 0))));
                Assert ("0:3:01 < 0:3:59", tz.ToLocalTime (dst_start_utc.Add (new TimeSpan (0, 1, 0))) < tz.ToLocalTime (dst_start_utc.Add (new TimeSpan (0, 59, 0))));