Merge pull request #128 from myd7349/master

Fix issue #127
This commit is contained in:
Dominic Hamon 2015-06-08 09:23:04 -07:00
commit d60945ac43

View File

@ -217,9 +217,9 @@ std::string DateTimeString(bool local) {
std::tm timeinfo;
std::memset(&timeinfo, 0, sizeof(std::tm));
if (local) {
::localtime_r(&now, &timeinfo);
localtime_r(&now, &timeinfo);
} else {
::gmtime_r(&now, &timeinfo);
gmtime_r(&now, &timeinfo);
}
std::size_t written = std::strftime(storage, sizeof(storage), "%F %T", &timeinfo);
CHECK(written < arraysize(storage));