Author: spouliot
Date: 2007-01-05 12:20:14 -0500 (Fri, 05 Jan 2007)
New Revision: 70541
Modified:
trunk/mcs/class/corlib/System/ChangeLog
trunk/mcs/class/corlib/System/DateTime.cs
Log:
2007-01-05 Sebastien Pouliot <[EMAIL PROTECTED]>
* DateTime.cs: Under 2.0 fix ParseExact to set DateTimeKind.Utc when
DateTimeStyles.AdjustToUniversal is used.
Modified: trunk/mcs/class/corlib/System/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System/ChangeLog 2007-01-05 17:18:45 UTC (rev
70540)
+++ trunk/mcs/class/corlib/System/ChangeLog 2007-01-05 17:20:14 UTC (rev
70541)
@@ -1,3 +1,8 @@
+2007-01-05 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * DateTime.cs: Under 2.0 fix ParseExact to set DateTimeKind.Utc when
+ DateTimeStyles.AdjustToUniversal is used.
+
2007-01-04 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* TermInfoDriver.cs: honor the backspace in ReadLine.
Modified: trunk/mcs/class/corlib/System/DateTime.cs
===================================================================
--- trunk/mcs/class/corlib/System/DateTime.cs 2007-01-05 17:18:45 UTC (rev
70540)
+++ trunk/mcs/class/corlib/System/DateTime.cs 2007-01-05 17:20:14 UTC (rev
70541)
@@ -1435,8 +1435,8 @@
if (tzoffset == -1)
tzoffset = 0;
if (tzsign == 1)
- tzoffset = -tzoffset
-;
+ tzoffset = -tzoffset;
+
utcoffset = new TimeSpan (tzoffset, tzoffmin,
0);
}
@@ -1445,6 +1445,10 @@
result = new DateTime (false, new TimeSpan (newticks));
if (use_localtime)
result = result.ToLocalTime ();
+#if NET_2_0
+ else
+ result.kind = DateTimeKind.Utc;
+#endif
return true;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches