Fixed time formatting with VS.

This commit is contained in:
Alexander Shaduri
2015-07-01 12:10:23 +00:00
parent 194fb51f75
commit 1d305e7626
+1 -1
View File
@@ -238,7 +238,7 @@ inline std::string format_date(const std::string& format, std::time_t timet, boo
{
#if defined HAVE_WIN_SE_FUNCS && HAVE_WIN_SE_FUNCS
struct std::tm ltm;
if (localtime_s(&ltm, &timet) == 0) // shut up msvc (it thinks std::localtime() is unsafe)
if (localtime_s(&ltm, &timet) != 0) // shut up msvc (it thinks std::localtime() is unsafe)
return std::string();
const struct std::tm* ltmp = &ltm;