gnucash maint: Bug 797197 - Transaction report: Error message when sorting on month
Christopher Lam
clam at code.gnucash.org
Mon May 27 09:23:24 EDT 2019
Updated via https://github.com/Gnucash/gnucash/commit/ed42f8ac (commit)
from https://github.com/Gnucash/gnucash/commit/8447f426 (commit)
commit ed42f8acb62b03634abd54201a9e8424752277fb
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon May 27 20:58:54 2019 +0800
Bug 797197 - Transaction report: Error message when sorting on month
guile's strftime is/was buggy; cannot handle non-UTF8 locales. Use
gnc_print_time64 instead. see the following
http://lists.gnu.org/archive/html/bug-guile/2019-05/msg00003.html
diff --git a/libgnucash/app-utils/date-utilities.scm b/libgnucash/app-utils/date-utilities.scm
index c83b518dd..f954d13fd 100644
--- a/libgnucash/app-utils/date-utilities.scm
+++ b/libgnucash/app-utils/date-utilities.scm
@@ -68,7 +68,7 @@
(gnc:date-get-year-day (gnc-localtime t64)))
(define (gnc:date-get-year-string datevec)
- (gnc-locale-to-utf8 (strftime "%Y" datevec)))
+ (gnc-print-time64 (gnc-mktime datevec) "%Y"))
(define (gnc:date-get-quarter-string datevec)
(format #f "Q~d" (gnc:date-get-quarter datevec)))
@@ -80,10 +80,10 @@
(gnc:date-get-year-string datevec)))
(define (gnc:date-get-month-string datevec)
- (gnc-locale-to-utf8 (strftime "%B" datevec)))
+ (gnc-print-time64 (gnc-mktime datevec) "%B"))
(define (gnc:date-get-month-year-string datevec)
- (gnc-locale-to-utf8 (strftime "%B %Y" datevec)))
+ (gnc-print-time64 (gnc-mktime datevec) "%B %Y"))
(define (gnc:date-get-week-year-string datevec)
(let* ((beginweekt64 (* (gnc:time64-get-week
Summary of changes:
libgnucash/app-utils/date-utilities.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
More information about the gnucash-changes
mailing list