[Mono-bugs] [Bug 76248][Wis] New - DateTime.ParseExact fails for DateTime.MinValue

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Sep 27 12:25:35 EDT 2005


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 csaba.halasz at gmail.com.

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

--- shadow/76248	2005-09-27 12:25:35.000000000 -0400
+++ shadow/76248.tmp.14990	2005-09-27 12:25:35.000000000 -0400
@@ -0,0 +1,64 @@
+Bug#: 76248
+Product: Mono: Class Libraries
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: Csaba.Halasz at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: DateTime.ParseExact fails for DateTime.MinValue
+
+Description of Problem:
+DateTime.ParseExact fails for DateTime.MinValue
+
+Steps to reproduce the problem:
+using System;
+using System.Globalization;
+
+class Test
+{
+        public static void Main(string[] args)
+        {
+                DateTime d = DateTime.ParseExact(
+                    "0001-01-01T00:00:00.0000000+01:00",
+                    "yyyy-MM-ddTHH:mm:ss.fffffffzzz",
+                    null, DateTimeStyles.None);
+                Console.WriteLine(d == DateTime.MinValue);
+        }
+}
+
+Actual Results:
+Unhandled Exception: System.ArgumentOutOfRangeException: Argument is out of
+range.
+in <0x000e5> System.DateTime:.ctor (Int64 newticks)
+in <0x016de> System.DateTime:_DoParse (System.String s, System.String
+format, Boolean exact, System.DateTime result,
+System.Globalization.DateTimeFormatInfo dfi, DateTimeStyles style,
+System.Boolean longYear)
+in <0x00045> System.DateTime:ParseExact (System.String s, System.String[]
+formats, System.Globalization.DateTimeFormatInfo dfi, DateTimeStyles style,
+System.DateTime ret, Boolean exact, System.Boolean longYear)
+in <0x00066> System.DateTime:ParseExact (System.String s, System.String[]
+formats, IFormatProvider fp, DateTimeStyles style)
+in <0x00040> System.DateTime:ParseExact (System.String s, System.String
+format, IFormatProvider fp, DateTimeStyles style)
+in <0x00024> Test:Main (System.String[] args)
+
+Expected Results:
+True
+
+How often does this happen? 
+Always.
+
+Additional Information:
+This is called by the soap formatter during remoting of DateTime.MinValue
+Might affect other overloads as well.
+Tested with monocharge-20050914


More information about the mono-bugs mailing list