From 59668db7f46bb9397f6ea6a9639e7c768701411e Mon Sep 17 00:00:00 2001 From: Vladimir Kargov Date: Wed, 3 Sep 2014 16:29:05 +0400 Subject: [PATCH] [corlib] In a TimeZone test, UtcOffset is taken for the current year, so take DaylightChanges for the current year as well. --- mcs/class/corlib/Test/System/TimeZoneTest.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)); -- 2.25.1