diff --git a/ChangeLog b/ChangeLog index f1507aae3..f64ca77c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-08-31 Mike Kestner + + * glib/Marshaller.cs : fix utc offseting for time_tToDateTime. + [Fixes #60960] + 2004-08-30 Tambet Ingo * glib/ListBase.cs : indexing bugfix for CopyTo. diff --git a/glib/Marshaller.cs b/glib/Marshaller.cs index 98e99307e..bdeae3e2e 100644 --- a/glib/Marshaller.cs +++ b/glib/Marshaller.cs @@ -161,6 +161,7 @@ namespace GLib { } static DateTime local_epoch = new DateTime (1970, 1, 1, 0, 0, 0); + static int utc_offset = (int) (DateTime.Now.Subtract (DateTime.UtcNow).TotalSeconds); public static IntPtr DateTimeTotime_t (DateTime time) { @@ -169,7 +170,8 @@ namespace GLib { public static DateTime time_tToDateTime (IntPtr time_t) { - return local_epoch.AddSeconds ((int)time_t); + Console.WriteLine ("in time_tToDateTime from"); + return local_epoch.AddSeconds ((int)time_t + utc_offset); } [DllImport("glibsharpglue")]