[Mono-bugs] [Bug 78569][Maj] Changed - DateTime.Parse fails to use
culture info
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Jun 7 00:55:31 EDT 2006
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 at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=78569
--- shadow/78569 2006-06-06 12:05:03.000000000 -0400
+++ shadow/78569.tmp.21843 2006-06-07 00:55:31.000000000 -0400
@@ -77,6 +77,33 @@
if (!al.Contains (pattern))
- al.Add (pattern);
+ al.Insert(0, pattern);
}
+
+------- Additional Comments From atsushi at ximian.com 2006-06-07 00:55 -------
+Now I created more meaningful testcase:
+
+using System;
+using System.Globalization;
+
+public class test_t {
+ public static void Main() {
+ DateTime dt = DateTime.Now;
+ CultureInfo ci = new CultureInfo ("en-GB");
+ string s = dt.ToString (ci);
+ DateTime dt2 = DateTime.Parse (s, ci);
+ Console.WriteLine ("{0} {1} {2} {3}",
+ s, ci.DateTimeFormat.ShortDatePattern, dt,
+dt2.Month);
+ }
+}
+
+./78569.exe
+07/06/2006 13:19:43 dd/MM/yyyy 2006/06/07 13:19:43 6
+
+mono ./78569.exe
+07/06/2006 13:19:48 dd/MM/yyyy 2006/06/07 13:19:48 7
+
+Looks like the problem is in DateTime.Parse() itself, not in
+locale-builder.
More information about the mono-bugs
mailing list