[Mono-bugs] [Bug 58938][Nor] Changed - DateTime Parsing Assumes GMT

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 26 May 2004 15:03:32 -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.


--- shadow/58938	2004-05-24 20:40:14.000000000 -0400
+++ shadow/58938.tmp.17049	2004-05-26 15:03:32.000000000 -0400
@@ -51,6 +51,28 @@
 How often does this happen? 
 Every time.
 Additional Information:
+------- Additional Comments From atsushi@ximian.com  2004-05-26 15:03 -------
+The cause of this bug is very complicated.
+First, when you try to parse date/time string without format, the
+format is regarded as "G" and thus supplied by CultureInfo. "G" means
+"ShortDatePattern + LongTimePattern", but there are more than one
+format for "G" on MS.NET.
+At this point, (1)we does not support all the available date/time
+patterns for each locale but just one, and thus (2)full
+GetAllDateTimePatterns() is not supported as well (precisely to say,
+it is totally not supported; I have a patch that will be applied
+soon). However, (3)we supports some extra  patterns for every locale.
+I tried en-US culture on Mono and I could not get "yyyy-MM-dd
+HH:mm:ss" pattern (used here) before UniversalSortableDateTimePattern
+(of "en-US" culture). So our DateTime recognizes that string as
+universal time string, and thus return the DateTime value which was
+regarded as non-local time.
+As a quick remedy, I will add "yyyy-MM-dd" as one of the extra pattern.