[Mono-bugs] [Bug 40910][Maj] New - Bad "Z" mask parsing in DateTime

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Mon, 7 Apr 2003 21:08:32 -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 spouliot@videotron.ca.

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

--- shadow/40910	Mon Apr  7 21:08:32 2003
+++ shadow/40910.tmp.22906	Mon Apr  7 21:08:32 2003
@@ -0,0 +1,69 @@
+Bug#: 40910
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: probably linux too
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: spouliot@videotron.ca               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Bad "Z" mask parsing in DateTime
+
+Description of Problem:
+
+Bad "Z" mask parsing in DateTime.
+This affects all unit tests using X509Certificate (X509Certificate, 
+Publisher) and (probably) all tools manipulating certificates.
+
+
+Steps to reproduce the problem:
+
+static void Main (string[] args)
+{
+	DateTime t = DateTime.ParseExact 
+("20030407210500Z", "yyyyMMddHHmmssZ", null);
+	Console.WriteLine (t);
+}
+
+
+Actual Results (tested on mono 0.23):
+
+Unhandled Exception: System.ArgumentOutOfRangeException: Valid values are 
+betwee
+n 1 and 9999 inclusive
+Parameter name: year
+in <0x00a4a> 00 System.DateTime:_DoParse 
+(string,string,bool,System.DateTime&,Sy
+stem.Globalization.DateTimeFormatInfo,System.Globalization.DateTimeStyles)
+in <0x000cd> 00 System.DateTime:ParseExact (string,string
+[],System.IFormatProvid
+er,System.Globalization.DateTimeStyles)
+in <0x00053> 00 System.DateTime:ParseExact 
+(string,string,System.IFormatProvider
+,System.Globalization.DateTimeStyles)
+in <0x0001c> 00 System.DateTime:ParseExact 
+(string,string,System.IFormatProvider
+)
+in <0x0002d> 00 mono.test.x509.X509Show:Main (string[])
+
+
+Expected Results (tested MS CLR):
+
+2003-04-07 17:05:00
+
+
+How often does this happen? 
+
+Always
+
+
+Additional Information:
+
+Seems that "Z" (in mask) is not parsed correctly.