[Mono-bugs] [Bug 49960][Nor] New - DateTime fails to parse "2001/1/1"

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 21 Oct 2003 17:19:08 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by gonzalo@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=49960

--- shadow/49960	2003-10-21 17:19:08.000000000 -0400
+++ shadow/49960.tmp.9067	2003-10-21 17:19:08.000000000 -0400
@@ -0,0 +1,41 @@
+Bug#: 49960
+Product: Mono/Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gonzalo@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: DateTime fails to parse "2001/1/1"
+
+using System;
+ 
+class C
+{
+        static void Main ()
+        {
+                Console.WriteLine (DateTime.Parse ("2001/1/1"));
+        }
+}
+
+Actual results:
+Unhandled Exception: System.FormatException: Invalid format
+in <0x00147> System.DateTime:ParseExact
+(string,string[],System.IFormatProvider,System.Globalization.DateTimeStyles)
+in <0x00024> System.DateTime:Parse
+(string,System.IFormatProvider,System.Globalization.DateTimeStyles)
+in <0x0001b> System.DateTime:Parse (string,System.IFormatProvider)
+in <0x00016> System.DateTime:Parse (string)
+in <0x00013> .C:Main ()
+
+
+Expected results:
+01/01/2001 0:00:00