Author: stephane
Date: 2008-01-24 07:45:29 -0500 (Thu, 24 Jan 2008)
New Revision: 93788
Modified:
trunk/mcs/class/System.Core/System/ChangeLog
trunk/mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs
trunk/mcs/class/System.Core/Test/System/ChangeLog
trunk/mcs/class/System.Core/Test/System/TimeZoneInfo.TransitionTimeTest.cs
Log:
2008-01-24 Stephane Delcroix <[EMAIL PROTECTED]>
* TimeZoneInfo.TransitionTime.cs: check for a whole number of
milliseconds instead of a whole number of seconds.
Modified: trunk/mcs/class/System.Core/System/ChangeLog
===================================================================
--- trunk/mcs/class/System.Core/System/ChangeLog 2008-01-24 12:40:41 UTC
(rev 93787)
+++ trunk/mcs/class/System.Core/System/ChangeLog 2008-01-24 12:45:29 UTC
(rev 93788)
@@ -1,3 +1,8 @@
+2008-01-24 Stephane Delcroix <[EMAIL PROTECTED]>
+
+ * TimeZoneInfo.TransitionTime.cs: check for a whole number of
+ milliseconds instead of a whole number of seconds.
+
2008-01-21 Sebastien Pouliot <[EMAIL PROTECTED]>
* TimeZoneInfo.TransitionTime.cs: Avoid NRE on bad cast if null is
Modified: trunk/mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs
===================================================================
--- trunk/mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs
2008-01-24 12:40:41 UTC (rev 93787)
+++ trunk/mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs
2008-01-24 12:45:29 UTC (rev 93788)
@@ -145,8 +145,8 @@
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");
Modified: trunk/mcs/class/System.Core/Test/System/ChangeLog
===================================================================
--- trunk/mcs/class/System.Core/Test/System/ChangeLog 2008-01-24 12:40:41 UTC
(rev 93787)
+++ trunk/mcs/class/System.Core/Test/System/ChangeLog 2008-01-24 12:45:29 UTC
(rev 93788)
@@ -1,3 +1,8 @@
+2008-01-24 Stephane Delcroix <[EMAIL PROTECTED]>
+
+ * TimeZoneInfo.TransitionTimeTest.cs: tests adapted to check for whole
+ number of _milli_seconds.
+
2008-01-23 Stephane Delcroix <[EMAIL PROTECTED]>
* TimeZoneInfo.AdjustmentRuleTests.cs:
Modified:
trunk/mcs/class/System.Core/Test/System/TimeZoneInfo.TransitionTimeTest.cs
===================================================================
--- trunk/mcs/class/System.Core/Test/System/TimeZoneInfo.TransitionTimeTest.cs
2008-01-24 12:40:41 UTC (rev 93787)
+++ trunk/mcs/class/System.Core/Test/System/TimeZoneInfo.TransitionTimeTest.cs
2008-01-24 12:45:29 UTC (rev 93788)
@@ -26,11 +26,9 @@
[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]
@@ -69,9 +67,7 @@
[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]
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches