From 9afa6c986c978c8f649073e914bc8f212645d6bf Mon Sep 17 00:00:00 2001 From: myd7349 Date: Fri, 5 Jun 2015 09:25:11 +0800 Subject: [PATCH] Fix issue #127 --- src/walltime.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/walltime.cc b/src/walltime.cc index 4580c392..e045729a 100644 --- a/src/walltime.cc +++ b/src/walltime.cc @@ -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));