2008-01-24 Stephane Delcroix <sdelcroix@novell.com>
authorStephane Delcroix <stephane@mono-cvs.ximian.com>
Thu, 24 Jan 2008 12:45:29 +0000 (12:45 -0000)
committerStephane Delcroix <stephane@mono-cvs.ximian.com>
Thu, 24 Jan 2008 12:45:29 +0000 (12:45 -0000)
* TimeZoneInfo.TransitionTime.cs: check for a whole number of
milliseconds instead of a whole number of seconds.

svn path=/trunk/mcs/; revision=93788

mcs/class/System.Core/System/ChangeLog
mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs
mcs/class/System.Core/Test/System/ChangeLog
mcs/class/System.Core/Test/System/TimeZoneInfo.TransitionTimeTest.cs

index 0e3340d2cb25e8af88b3390676864450da120b3f..fb72111016382bb43a10674b4e06d0fde6b1cd04 100644 (file)
@@ -1,3 +1,8 @@
+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
index 1b5c4927976d6a4036196992f45ea98df02b747e..9a79bcae6a627c11ddc5c02c1221286f686ae51d 100644 (file)
@@ -145,8 +145,8 @@ namespace System
                                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");
index d1169ee1b6b1e45bba7a91c011241ee2464d40dd..07a0a09a736870dc2309ac4d3589c7be5e590286 100644 (file)
@@ -1,3 +1,8 @@
+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:
index ec54ab3f8acc0354525d793e9579ce247d9e5c96..8dd8263fd223fb82fdb01679173c6c948460538e 100644 (file)
@@ -26,11 +26,9 @@ namespace MonoTests.System
                
                        [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 @@ namespace MonoTests.System
                        [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]