gnucash maint: Fix broken month in aqbanking<6 import

Christian Stimming cstim at code.gnucash.org
Wed Jul 29 16:21:46 EDT 2020


Updated	 via  https://github.com/Gnucash/gnucash/commit/b36a0125 (commit)
	from  https://github.com/Gnucash/gnucash/commit/d6ceec68 (commit)



commit b36a01251272011b05cc35cde6d9d422dcdfaa2f
Author: Christian Stimming <christian at cstimming.de>
Date:   Wed Jul 29 22:01:52 2020 +0200

    Fix broken month in aqbanking<6 import
    
    The used GWEN_Time_GetBrokenDownDate returns month in interval [0..11].

diff --git a/gnucash/import-export/aqb/gnc-ab-utils.c b/gnucash/import-export/aqb/gnc-ab-utils.c
index 0199f17bb..2a15cee40 100644
--- a/gnucash/import-export/aqb/gnc-ab-utils.c
+++ b/gnucash/import-export/aqb/gnc-ab-utils.c
@@ -99,7 +99,8 @@ gnc_gwen_date_to_time64 (const GNC_GWEN_DATE* date)
 #else
     int month, day, year;
     GWEN_Time_GetBrokenDownDate(date, &day, &month, &year);
-    return gnc_dmy2time64_neutral(day, month, year);
+    /* GWEN_Time_GetBrokenDownDate returns localtime(3) format; month is [0..11] */
+    return gnc_dmy2time64_neutral(day, month + 1, year);
 #endif
 }
 



Summary of changes:
 gnucash/import-export/aqb/gnc-ab-utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list