+2008-01-24 Stephane Delcroix <sdelcroix@novell.com>
+
+ * TimeZoneInfo.TransitionTime.cs: check for a whole number of
+ milliseconds instead of a whole number of seconds.
+
2008-01-21 Sebastien Pouliot <sebastien@ximian.com>
* TimeZoneInfo.TransitionTime.cs: Avoid NRE on bad cast if null is
if (timeOfDay.Kind != DateTimeKind.Unspecified)
throw new ArgumentException ("timeOfDay parameter Kind's property is not DateTimeKind.Unspecified");
- if (timeOfDay.Ticks % TimeSpan.TicksPerSecond != 0)
- throw new ArgumentException ("timeOfDay parameter does not represent a whole number of seconds");
+ if (timeOfDay.Ticks % TimeSpan.TicksPerMillisecond != 0)
+ throw new ArgumentException ("timeOfDay parameter does not represent a whole number of milliseconds");
if (month < 1 || month > 12)
throw new ArgumentOutOfRangeException ("month parameter is less than 1 or greater than 12");
+2008-01-24 Stephane Delcroix <sdelcroix@novell.com>
+
+ * TimeZoneInfo.TransitionTimeTest.cs: tests adapted to check for whole
+ number of _milli_seconds.
+
2008-01-23 Stephane Delcroix <sdelcroix@novell.com>
* TimeZoneInfo.AdjustmentRuleTests.cs:
[Test]
[ExpectedException (typeof (ArgumentException))]
- public void DateNotInSeconds ()
+ public void DateNotInMilliSeconds ()
{
- if (Environment.OSVersion.Platform != PlatformID.Unix)
- throw new ArgumentException ();;
- TimeZoneInfo.TransitionTime.CreateFixedDateRule (new DateTime (1, 1, 1, 2, 0, 0, 77), 3, 15);
+ TimeZoneInfo.TransitionTime.CreateFixedDateRule (new DateTime (50), 3, 15);
}
[Test]
[ExpectedException (typeof (ArgumentException))]
public void DateNotInSeconds ()
{
- if (Environment.OSVersion.Platform != PlatformID.Unix)
- throw new ArgumentException ();;
- TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 2, 0, 0, 77), 3, 4, DayOfWeek.Sunday);
+ TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (50), 3, 4, DayOfWeek.Sunday);
}
[Test]