[corlib] In a TimeZone test, UtcOffset is taken for the current year, so take Dayligh...
authorVladimir Kargov <vkargov@users.noreply.github.com>
Wed, 3 Sep 2014 12:29:05 +0000 (16:29 +0400)
committerVladimir Kargov <vkargov@users.noreply.github.com>
Wed, 3 Sep 2014 12:36:35 +0000 (16:36 +0400)
mcs/class/corlib/Test/System/TimeZoneTest.cs

index 6f97c359ebc9c9c36e5b56bdbf6b76bcca114680..47915f722b425e2200c4b8fb3da81903950d05aa 100644 (file)
@@ -303,11 +303,12 @@ public class TimeZoneTest {
 
 
                        TimeZone tz = TimeZone.CurrentTimeZone;
-                       DaylightTime daylightChanges = tz.GetDaylightChanges(2007);
+                       int year = DateTime.Now.Year;
+                       DaylightTime daylightChanges = tz.GetDaylightChanges(year);
                        DateTime dst_end = daylightChanges.End;
 
                        if (dst_end == DateTime.MinValue)
-                               Assert.Ignore (tz.StandardName + " did not observe daylight saving time during 2007.");
+                               Assert.Ignore (tz.StandardName + " did not observe daylight saving time during " + year + ".");
 
                        var standardOffset = tz.GetUtcOffset(daylightChanges.Start.AddMinutes(-1));