From: Vladimir Kargov Date: Wed, 3 Sep 2014 12:29:05 +0000 (+0400) Subject: [corlib] In a TimeZone test, UtcOffset is taken for the current year, so take Dayligh... X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=59668db7f46bb9397f6ea6a9639e7c768701411e [corlib] In a TimeZone test, UtcOffset is taken for the current year, so take DaylightChanges for the current year as well. --- diff --git a/mcs/class/corlib/Test/System/TimeZoneTest.cs b/mcs/class/corlib/Test/System/TimeZoneTest.cs index 6f97c359ebc..47915f722b4 100644 --- a/mcs/class/corlib/Test/System/TimeZoneTest.cs +++ b/mcs/class/corlib/Test/System/TimeZoneTest.cs @@ -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));