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 3bdf4e4 commit 2c42abf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gettext_boost.cpp
Expand Up @@ -517,7 +517,8 @@ std::string strftime(const std::string& format, const std::tm* time)
std::lock_guard<std::mutex> lock(get_mutex());
dummy.imbue(get_manager().get_locale());
// See utils/io.hpp for explanation of this check
#if HAVE_PUT_TIME
#if 0 // HAVE_PUT_TIME is 1 for nearly everything except GCC < 5 however put_time does not adjust for locale in Linux
// HAVE_PUT_TIME is still used by io.hpp so change the value here instead of in global.hpp
dummy << std::put_time(time, format.c_str());
#else
dummy << bl::as::ftime(format) << mktime(const_cast<std::tm*>(time));
Expand Down

0 comments on commit 2c42abf

Please sign in to comment.