[Mono-bugs] [Bug 30030][Nor] New - DateTime.ToUniversalTime() not returning correct value
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
8 Sep 2002 14:12:35 -0000
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 ndrochak@gol.com.
http://bugzilla.ximian.com/show_bug.cgi?id=30030
--- shadow/30030 Sun Sep 8 10:12:35 2002
+++ shadow/30030.tmp.27434 Sun Sep 8 10:12:35 2002
@@ -0,0 +1,44 @@
+Bug#: 30030
+Product: Mono/Class Libraries
+Version: unspecified
+OS: Red Hat 7.2
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: ndrochak@gol.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: DateTime.ToUniversalTime() not returning correct value
+
+The follow code runs correctly on ms.net, but on mono on linux,
+incorrectly returns "Monday, 25 February 2002 05:25:13". I tracked the
+problem as far as TimeZone.GetUtcOffset()...
+
+=== cut === cut === cut === cut === cut === cut ===
+
+using System;
+using System.Threading;
+using System.Globalization;
+
+class Class1
+{
+ static int Main(string[] args)
+ {
+ Thread.CurrentThread.CurrentCulture = new CultureInfo
+("");
+ DateTime t1 = new DateTime (631502115130080000L);
+ if ("Sunday, 24 February 2002 11:25:13" ==
+t1.ToUniversalTime().ToString ("U")) {
+ return 0;
+ }
+ Console.WriteLine(t1.ToUniversalTime().ToString ("U"));
+ return 1;
+ }
+}
+=== cut === cut === cut === cut === cut === cut ===