diff --git a/ChangeLog b/ChangeLog index 44f821f17..0d5a263d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-28 Mike Kestner + + * glib/Marshaller.cs: some 64 bit fixes for time_t marshaling + issue found by Federico. + 2008-06-28 Mike Kestner * gtk/TreeSelection.custom: use list marshaler to avoid O(n^2) diff --git a/glib/Marshaller.cs b/glib/Marshaller.cs index e2ae0f92c..79d0ab436 100644 --- a/glib/Marshaller.cs +++ b/glib/Marshaller.cs @@ -312,12 +312,12 @@ namespace GLib { public static IntPtr DateTimeTotime_t (DateTime time) { - return new IntPtr (((int)time.Subtract (local_epoch).TotalSeconds) - utc_offset); + return new IntPtr (((long)time.Subtract (local_epoch).TotalSeconds) - utc_offset); } public static DateTime time_tToDateTime (IntPtr time_t) { - return local_epoch.AddSeconds ((int)time_t + utc_offset); + return local_epoch.AddSeconds (time_t.ToInt64 () + utc_offset); } [DllImport("glibsharpglue-2")]