diff options
author | Miguel de Icaza <miguel@gnome.org> | 2006-12-04 04:03:02 +0300 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2006-12-04 04:03:02 +0300 |
commit | dcca9f5e7a2f84e9cc5aa8cab56631681b60f6a6 (patch) | |
tree | d9c1014eed3f60dd139d01d829869b7317fb63de | |
parent | b441ad10f5770d7a171edf2f778dd50d37208732 (diff) |
Put in 1-2-2
svn path=/branches/mono-1-2-2/mcs/; revision=68919
-rw-r--r-- | mcs/class/corlib/System/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/corlib/System/DateTime.cs | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/mcs/class/corlib/System/ChangeLog b/mcs/class/corlib/System/ChangeLog index 2038533ee78..f9a43980bad 100644 --- a/mcs/class/corlib/System/ChangeLog +++ b/mcs/class/corlib/System/ChangeLog @@ -1,3 +1,8 @@ +2006-12-03 Miguel de Icaza <miguel@novell.com> + + * DateTime.cs: Fix this on the 2.0 profile, return the + DateTimeKind for the Now property + 2006-11-29 Martin Baulig <martin@ximian.com> * INullableValue.cs: Removed. diff --git a/mcs/class/corlib/System/DateTime.cs b/mcs/class/corlib/System/DateTime.cs index 3579ce88386..857d690e30d 100644 --- a/mcs/class/corlib/System/DateTime.cs +++ b/mcs/class/corlib/System/DateTime.cs @@ -432,7 +432,7 @@ namespace System { long now = GetNow (); DateTime dt = new DateTime (now); - + if ((now - last_now) > TimeSpan.TicksPerMinute){ to_local_time_span_object = TimeZone.CurrentTimeZone.GetLocalTimeDiff (dt); last_now = now; @@ -440,7 +440,11 @@ namespace System } // This is boxed, so we avoid locking. - return dt + (TimeSpan) to_local_time_span_object; + DateTime ret = dt + (TimeSpan) to_local_time_span_object; +#if NET_2_0 + ret.kind = DateTimeKind.Local; +#endif + return ret; } } |