From 957df9a32b6db7ef06c49f671183bf7c83521155 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Mon, 27 May 2019 14:14:53 -0700 Subject: [PATCH] Add a +0000 offset to ISO8601 timestamps in the XML backend. Apparently GnuCash for Android hard-coded the offset spec into their parser, so it can't import XML files without it. --- libgnucash/backend/xml/sixtp-dom-generators.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libgnucash/backend/xml/sixtp-dom-generators.cpp b/libgnucash/backend/xml/sixtp-dom-generators.cpp index 4ddd0bf4c9..d8a58eda00 100644 --- a/libgnucash/backend/xml/sixtp-dom-generators.cpp +++ b/libgnucash/backend/xml/sixtp-dom-generators.cpp @@ -140,6 +140,7 @@ time64_to_dom_tree (const char* tag, const time64 time) auto date_str = GncDateTime(time).format_iso8601(); if (date_str.empty()) return NULL; + date_str += " +0000"; //Tack on a UTC offset to mollify GnuCash for Android ret = xmlNewNode (NULL, BAD_CAST tag); xmlNewTextChild (ret, NULL, BAD_CAST "ts:date", checked_char_cast (const_cast(date_str.c_str())));