From 6603d5e31fcd30223da0933591cad1dabc0b7101 Mon Sep 17 00:00:00 2001 From: Kirill Leyfer Date: Thu, 12 May 2016 16:09:15 +0600 Subject: [PATCH] Fix throwing exception if DYNAMIC_TIME_ZONE_INFORMATION fails under windows. --- include/spdlog/details/os.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index 4567fca1..8fb09696 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -209,7 +209,7 @@ inline int utc_minutes_offset(const std::tm& tm = details::os::localtime()) auto rv = GetDynamicTimeZoneInformation(&tzinfo); #endif if (rv == TIME_ZONE_ID_INVALID) - throw spdlog::spdlog_ex("Failed getting timezone info. Last error: " + GetLastError()); + throw spdlog::spdlog_ex("Failed getting timezone info. Last error: " + std::to_string(GetLastError())); int offset = -tzinfo.Bias; if (tm.tm_isdst)