2004-08-19 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Thu, 19 Aug 2004 03:46:47 +0000 (03:46 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Thu, 19 Aug 2004 03:46:47 +0000 (03:46 -0000)
* DateTime.cs : When hour format is "hh", MS.NET (maybe incorrectly)
  allows 12, that should not be accepted (13 is rejected) and
  interpreted as 0. This fixes bug 63376.

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

mcs/class/corlib/System/ChangeLog
mcs/class/corlib/System/DateTime.cs

index 312d139969cbce429fdba90f508520a2f6b76f7e..629142c026fc42619da65e571bb7313457e20ad7 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-19  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * DateTime.cs : When hour format is "hh", MS.NET (maybe incorrectly)
+         allows 12, that should not be accepted (13 is rejected) and
+         interpreted as 0. This fixes bug 63376.
+
 2004-08-17  Sebastien Pouliot  <sebastien@ximian.com>
 
        * Version.cs: Fixed Clone so we can use it on versions with only
index 47462667f2c233f6663dbb1d2e3cb3f5ce4c1c54..6e11789d96a52e2c8e4341c69b23def8304cc10b 100644 (file)
@@ -1024,8 +1024,10 @@ namespace System
                                                num = 1;
                                        }
 
-                                       if (hour >= 12)
+                                       if (hour > 12)
                                                return false;
+                                       if (hour == 12)
+                                               hour = 0;
 
                                        break;
                                case 'H':