From 1d305e7626661fc5c9a67f8815c0290d0bb2727c Mon Sep 17 00:00:00 2001 From: Alexander Shaduri Date: Wed, 1 Jul 2015 12:10:23 +0000 Subject: [PATCH] Fixed time formatting with VS. --- gsmartcontrol/src/hz/format_unit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsmartcontrol/src/hz/format_unit.h b/gsmartcontrol/src/hz/format_unit.h index afe0501..818998e 100644 --- a/gsmartcontrol/src/hz/format_unit.h +++ b/gsmartcontrol/src/hz/format_unit.h @@ -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(<m, &timet) == 0) // shut up msvc (it thinks std::localtime() is unsafe) + if (localtime_s(<m, &timet) != 0) // shut up msvc (it thinks std::localtime() is unsafe) return std::string(); const struct std::tm* ltmp = <m;