r23414 - gnucash/trunk/src/core-utils - Bug 711289 - time zone handling is inconsistent between 2.4 and 2.5

John Ralls jralls at code.gnucash.org
Tue Nov 19 22:15:25 EST 2013


Author: jralls
Date: 2013-11-19 22:15:25 -0500 (Tue, 19 Nov 2013)
New Revision: 23414
Trac: http://svn.gnucash.org/trac/changeset/23414

Modified:
   gnucash/trunk/src/core-utils/gnc-gdate-utils.c
Log:
Bug 711289 - time zone handling is inconsistent between 2.4 and 2.5

This had escaped the windows TZ workaround.

Modified: gnucash/trunk/src/core-utils/gnc-gdate-utils.c
===================================================================
--- gnucash/trunk/src/core-utils/gnc-gdate-utils.c	2013-11-19 20:28:10 UTC (rev 23413)
+++ gnucash/trunk/src/core-utils/gnc-gdate-utils.c	2013-11-20 03:15:25 UTC (rev 23414)
@@ -29,17 +29,15 @@
 void
 gnc_gdate_set_today (GDate* gd)
 {
-    GDateTime *gdt = g_date_time_new_now_local ();
-    gint y, m, d;
-    g_date_time_get_ymd (gdt, &y, &m, &d);
-    g_date_set_dmy (gd, d, m, y);
-    g_date_time_unref (gdt);
+    GDate *today = gnc_g_date_new_today ();
+    g_date_set_julian (gd, g_date_get_julian (today));
+    g_date_free (today);
 }
 
 void
 gnc_gdate_set_time64 (GDate* gd, time64 time)
 {
-    GDateTime *gdt = g_date_time_new_from_unix_local (time);
+    GDateTime *gdt = gnc_g_date_time_new_from_unix_local (time);
     gint y, m, d;
     g_date_time_get_ymd (gdt, &y, &m, &d);
     g_date_set_dmy (gd, d, m, y);



More information about the gnucash-changes mailing list