[Mono-bugs] [Bug 57566][Nor] Changed - Default DateTime doesn't match .NET's

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 5 May 2004 14:13:37 -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 atsushi@ximian.com.

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

--- shadow/57566	2004-04-24 13:10:13.000000000 -0400
+++ shadow/57566.tmp.25493	2004-05-05 14:13:37.000000000 -0400
@@ -54,6 +54,60 @@
 it's in -0900.
 
 ------- Additional Comments From jackson@ximian.com  2004-04-24 13:10 -------
 Are you sure your culture is the same on all three machines? (echo
 $LANG on Unix, check the control panel on windows). Or
 Console.WriteLine (System.Globalization.CultureInfo.CurrentCulture);
+
+------- Additional Comments From atsushi@ximian.com  2004-05-05 14:13 -------
+Am also getting similar results, with this test:
+
+----
+using System;
+using System.Globalization;
+using System.Threading;
+
+public class Test
+{
+        public static void Main ()
+        {
+                Console.WriteLine (CultureInfo.CurrentCulture);
+                Console.WriteLine (DateTime.Now.ToString ());
+                Console.WriteLine (DateTime.Now.ToString
+(CultureInfo.CurrentCulture));
+                // invariant
+                Thread.CurrentThread.CurrentCulture =
+CultureInfo.InvariantCulture;
+                Console.WriteLine (CultureInfo.CurrentCulture);
+                Console.WriteLine (DateTime.Now.ToString ());
+                Console.WriteLine (DateTime.Now.ToString
+(CultureInfo.CurrentCulture));
+        }
+}
+
+----
+
+Results on Windows were:
+
+ginga@r50 ~/tests
+$ ./datetostring.exe
+ja-JP
+2004/05/06 2:51:21
+2004/05/06 2:51:21
+
+05/06/2004 02:51:21
+05/06/2004 02:51:21
+
+ginga@r50 ~/tests
+$ mono datetostring.exe
+ja-JP
+04/05/06 11:51:23:+9
+2004**5**6** 11:51:23:+9
+
+05/06/2004 11:51:23
+Thursday, 06 May 2004 11:51:23
+
+----
+I ran this test on my Japanese machine, and here 
+** are probably Japanese Kanji for year/month/day.
+
+As for time value difference, it might be because of cygwin dependent.