This commit is contained in:
gabime
2014-01-27 11:44:10 +02:00
parent fa6f8b3c9a
commit 9934ea4044
11 changed files with 22 additions and 296 deletions

View File

@@ -7,11 +7,14 @@ namespace details {
namespace os {
std::tm localtime(const std::time_t &time_t)
{
#ifdef _MSC_VER
std::tm tm;
#ifdef _MSC_VER
localtime_s(&tm, &time_t);
return tm;
#else
localtime_r(&time_t, &tm);
#endif
return tm;
}
std::tm localtime()
@@ -21,4 +24,4 @@ std::tm localtime()
}
}
}
}
}