Fix unlocalized date in status bar.

It seems that std::locales created by boost::locale::generator are
not entirely compatible: If used to create a new locale with a facet
for boost::date_time one ends up with the C locale and the facet.

For the time being avoid the problem by using boost::locale to format
dates and times. std::chrono gets calendar functions in C++20 so we
can switch date-time backends once we can adopt it.
This commit is contained in:
John Ralls
2019-01-19 13:41:17 -08:00
parent 72ef48cbf2
commit e31f4c3f95
2 changed files with 10 additions and 22 deletions

View File

@@ -392,7 +392,7 @@ TEST(gnc_datetime_constructors, test_gncdate_neutral_constructor)
if (gncdt.offset() >= max_western_offset &&
gncdt.offset() <= max_eastern_offset)
{
EXPECT_EQ(atime.format("%d-%m-%Y %H:%M:%S %z"), "20-04-2017 10:59:00 UTC");
EXPECT_EQ(atime.format("%d-%m-%Y %H:%M:%S %Z"), "20-04-2017 10:59:00 GMT");
}
}