Skip to content

Commit

Permalink
Disable use of std::put_time in strftime()
Browse files Browse the repository at this point in the history
Fixes #1709
  • Loading branch information
Wedge009 committed Sep 16, 2019
1 parent 36c0016 commit 117f92e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gettext.cpp
Expand Up @@ -510,7 +510,8 @@ 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 << std::put_time(time, format.c_str());
// 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));

return dummy.str();
}
Expand Down

0 comments on commit 117f92e

Please sign in to comment.