Fix throwing exception if DYNAMIC_TIME_ZONE_INFORMATION fails under windows.

This commit is contained in:
Kirill Leyfer 2016-05-12 16:09:15 +06:00
parent 9b984ddbed
commit 6603d5e31f
1 changed files with 1 additions and 1 deletions

View File

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