[Mono-bugs] [Bug 71290][Nor] New - DateTime parsing and UTC is wrong.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 14 Jan 2005 17:43:48 -0500 (EST)


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 miguel@ximian.com.

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

--- shadow/71290	2005-01-14 17:43:48.000000000 -0500
+++ shadow/71290.tmp.12540	2005-01-14 17:43:48.000000000 -0500
@@ -0,0 +1,43 @@
+Bug#: 71290
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: miguel@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Summary: DateTime parsing and UTC is wrong.
+
+The following program should not print anything:
+
+using System.Globalization;
+using System;
+
+class X {
+	static void AssertEquals (string msg, int a, int b)
+	{
+		if (a != b)
+			Console.WriteLine ("Test {0} fails", msg);
+	}
+	
+	static void Main ()
+	{
+		DateTime t1 = DateTime.ParseExact ("2002-02-25 04:25:13Z", "u", null);
+		AssertEquals ("D07a", 2002, t1.Year);
+		AssertEquals ("D07b", 02, t1.Month);
+		AssertEquals ("D07c", 25, t1.Day);
+		AssertEquals ("D07e", 25, t1.Minute);
+		AssertEquals ("D07f", 13, t1.Second);
+
+	}
+}
+
+Notice that the obvious fix in the code (which is to return as soon
+as we have the utc value) breaks other tests according to Sebastien