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.
This commit is contained in:
John Ralls 2019-05-27 14:14:53 -07:00
parent f76226f912
commit 957df9a32b

View File

@ -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<char*>(date_str.c_str())));