[Mono-bugs] [Bug 66723][Nor] New - DateTime.Parse throws exception using a different CultureInfo

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 23 Sep 2004 12:36:19 -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 joergr@voelcker.com.

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

--- shadow/66723	2004-09-23 12:36:19.000000000 -0400
+++ shadow/66723.tmp.16646	2004-09-23 12:36:19.000000000 -0400
@@ -0,0 +1,47 @@
+Bug#: 66723
+Product: Mono: Class Libraries
+Version: unspecified
+OS: Suse 8.2
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: JoergR@voelcker.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: DateTime.Parse throws exception using a different CultureInfo
+
+Description of Problem:
+Running DateTime.Parse with the string "12/31/2040 23:59:59Z" using
+CultureInfo en-US on a german workstation (de-DE) throws an exception.
+
+Steps to reproduce the problem:
+1. Compile the attached sample
+2. Run it on a workstation with non american settings (de-DE in this case)
+
+Actual Results:
+Current Culture: de-DE
+Parsed time (Invariant): 31.12.2040 23:59:59
+
+Unhandled Exception: System.FormatException: String was not recognized as a
+valid DateTime.
+in <0x00356> System.DateTime:Parse
+(string,System.IFormatProvider,System.Globalization.DateTimeStyles)
+in <0x00016> System.DateTime:Parse (string,System.IFormatProvider)
+in <0x000a9> Test:Main ()
+
+
+Expected Results (taken from MS.NET):
+Current Culture: de-DE
+Parsed time (Invariant): 31.12.2040 23:59:59
+Parsed time (en-US): 01.01.2041 00:59:59
+
+How often does this happen? 
+Always
+
+Additional Information: