diff --git a/src/engine/Transaction.c b/src/engine/Transaction.c index 940859c258..d38f4d70fa 100644 --- a/src/engine/Transaction.c +++ b/src/engine/Transaction.c @@ -1791,8 +1791,9 @@ xaccTransSetDateInternal(Transaction *trans, Timespec *dadate, Timespec val) { time64 secs = (time64) val.tv_sec; gchar *tstr = gnc_ctime (&secs); - PINFO ("addr=%p set date to %" G_GUINT64_FORMAT ".%09ld %s", + PINFO ("addr=%p set date to %" G_GUINT64_FORMAT ".%09ld %s\n", trans, val.tv_sec, val.tv_nsec, tstr ? tstr : "(null)"); + g_free(tstr); } *dadate = val; diff --git a/src/libqof/qof/gnc-date.c b/src/libqof/qof/gnc-date.c index ecc951cb96..be70c68b89 100644 --- a/src/libqof/qof/gnc-date.c +++ b/src/libqof/qof/gnc-date.c @@ -438,7 +438,7 @@ gchar* gnc_ctime (const time64 *secs) { GDateTime *gdt = gnc_g_date_time_new_from_unix_local (*secs); - gchar *string = g_date_time_format (gdt, "%a %b %e %H:%M:%S %Y\n"); + gchar *string = g_date_time_format (gdt, "%a %b %e %H:%M:%S %Y"); g_date_time_unref (gdt); return string; } diff --git a/src/libqof/qof/test/test-gnc-date.c b/src/libqof/qof/test/test-gnc-date.c index 5d24cb1309..0bac35d318 100644 --- a/src/libqof/qof/test/test-gnc-date.c +++ b/src/libqof/qof/test/test-gnc-date.c @@ -293,7 +293,7 @@ test_gnc_ctime (void) GDateTime *gdt = gncdt.new_from_unix_local (secs[ind]); gchar* datestr = gnc_ctime (&secs[ind]); g_assert_cmpstr (datestr, ==, - g_date_time_format (gdt, "%a %b %e %H:%M:%S %Y\n")); + g_date_time_format (gdt, "%a %b %e %H:%M:%S %Y")); g_date_time_unref (gdt); g_free (datestr); }