Add a note regarding imbue() and hard-coded locales.

[ci skip]
This commit is contained in:
Wedge009 2019-09-16 16:53:36 +10:00
parent 117f92edbc
commit fececabd67

View file

@ -509,7 +509,7 @@ std::string strftime(const std::string& format, const std::tm* time)
{
std::basic_ostringstream<char> dummy;
std::lock_guard<std::mutex> lock(get_mutex());
dummy.imbue(get_manager().get_locale());
dummy.imbue(get_manager().get_locale()); // TODO: Calling imbue() with hard-coded locale appears to work with put_time in glibc, but not with get_locale()...
// Revert to use of boost (from 1.14) instead of std::put_time() because the latter does not appear to handle locale properly in Linux
dummy << bl::as::ftime(format) << mktime(const_cast<std::tm*>(time));