Implement a faster date-time serialization function.

Has the side effect of recording all date-times in XML files in UTC
instead of local time with a timezone.
This commit is contained in:
John Ralls committed 2019-01-04 16:34:33 -08:00
1 parent 137c920d06
commit 9fa7b7f940
7 files changed
+33 -19

No files matched your search

@@ -448,8 +448,9 @@ GncSqlColumnTableEntryImpl<CT_TIME>::add_to_query(QofIdTypeConst obj_name,
if (t64 > MINTIME && t64 < MAXTIME)
{
GncDateTime time(t64);
vec.emplace_back (std::make_pair (std::string{m_col_name},
time.format_zulu ("'%Y-%m-%d %H:%M:%S'")));
std::string timestr("'");
timestr += time.format_iso8601() + "'";
vec.emplace_back (std::make_pair (std::string{m_col_name}, timestr));
}
else
{
@@ -853,7 +853,7 @@ convert_query_term_to_sql (const GncSqlBackend* sql_be, const gchar* fieldName,
query_date_t date_data = (query_date_t)pPredData;
GncDateTime time(date_data->date);
sql << time.format_zulu ("%Y-%m-%d %H:%M:%S");
sql << time.format_iso8601();
}
else if (strcmp (pPredData->type_name, QOF_TYPE_INT32) == 0)
{