We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76fec09 commit 507145dCopy full SHA for 507145d
src/utiltime.cpp
@@ -74,8 +74,9 @@ void MilliSleep(int64_t n)
74
75
std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime)
76
{
77
+ static std::locale classic(std::locale::classic());
78
// std::locale takes ownership of the pointer
- std::locale loc(std::locale::classic(), new boost::posix_time::time_facet(pszFormat));
79
+ std::locale loc(classic, new boost::posix_time::time_facet(pszFormat));
80
std::stringstream ss;
81
ss.imbue(loc);
82
ss << boost::posix_time::from_time_t(nTime);
0 commit comments