Fix GncDateTime::format_zulu to emit the UTC timezone.

Instead of the GncDateTime's timezone with the UTC timestamp.
This commit is contained in:
John Ralls
2021-03-21 13:53:48 -07:00
parent 902561fa11
commit ebb5eb1f17

View File

@@ -517,8 +517,7 @@ GncDateTimeImpl::format_zulu(const char* format) const
return win_date_format(sformat, utc_tm());
#else
using Facet = boost::local_time::local_time_facet;
auto offset = m_time.local_time() - m_time.utc_time();
auto zulu_time = m_time - offset;
auto zulu_time = LDT{m_time.utc_time(), utc_zone};
auto output_facet(new Facet(normalize_format(format).c_str()));
std::stringstream ss;
ss.imbue(std::locale(gnc_get_locale(), output_facet));