r23396 - gnucash/trunk/src/libqof/qof - Bug 711289: Time Zone Handling is Inconsistent between 2.4 and 2.5
John Ralls
jralls at code.gnucash.org
Fri Nov 15 14:17:31 EST 2013
Author: jralls
Date: 2013-11-15 14:17:30 -0500 (Fri, 15 Nov 2013)
New Revision: 23396
Trac: http://svn.gnucash.org/trac/changeset/23396
Modified:
gnucash/trunk/src/libqof/qof/gnc-date.c
Log:
Bug 711289: Time Zone Handling is Inconsistent between 2.4 and 2.5
Also Bug 699977: Since Last Run Assistant Using Wrong Time Zone in
Release 2.5.1.
Fix an error in the formatting of TZ offsets to g_time_zone_new().
Modified: gnucash/trunk/src/libqof/qof/gnc-date.c
===================================================================
--- gnucash/trunk/src/libqof/qof/gnc-date.c 2013-11-14 14:24:54 UTC (rev 23395)
+++ gnucash/trunk/src/libqof/qof/gnc-date.c 2013-11-15 19:17:30 UTC (rev 23396)
@@ -111,7 +111,7 @@
gint bias = tzinfo.Bias + tzinfo.StandardBias;
gint hours = -bias / 60; // 60 minutes per hour
gint minutes = (bias < 0 ? -bias : bias) % 60;
- gchar *tzstr = g_strdup_printf ("%+02d%02d", hours, minutes);
+ gchar *tzstr = g_strdup_printf ("%+03d:%02d", hours, minutes);
GTimeZone *tz = g_time_zone_new(tzstr);
g_free (tzstr);
return tz;
@@ -142,7 +142,7 @@
bias = tzinfo.Bias + tzinfo.DaylightBias;
hours = -bias / 60; // 60 minutes per hour
minutes = (bias < 0 ? -bias : bias) % 60;
- tzstr = g_strdup_printf ("%+02d%02d", hours, minutes);
+ tzstr = g_strdup_printf ("%+03d:%02d", hours, minutes);
tz = g_time_zone_new(tzstr);
}
#endif
More information about the gnucash-changes
mailing list