Disable use of std::put_time in strftime()

Fixes #1709
This commit is contained in:
Wedge009 2019-09-14 11:48:36 +10:00
parent 3bdf4e494a
commit 2c42abf909

View file

@ -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));