diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/blockchain_utilities/blockchain_stats.cpp | 2 | ||||
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/blockchain_utilities/blockchain_stats.cpp b/src/blockchain_utilities/blockchain_stats.cpp index 716b33cae..aae8f333b 100644 --- a/src/blockchain_utilities/blockchain_stats.cpp +++ b/src/blockchain_utilities/blockchain_stats.cpp @@ -234,7 +234,7 @@ plot 'stats.csv' index "DATA" using (timecolumn(1,"%Y-%m-%d")):4 with lines, '' } time_t tt = blk.timestamp; char timebuf[64]; - gmtime_r(&tt, &currtm); + epee::misc_utils::get_gmt_time(tt, currtm); if (!prevtm.tm_year) prevtm = currtm; // catch change of day diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 77eacaf16..6e657b057 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -6731,11 +6731,7 @@ static std::string get_human_readable_timestamp(uint64_t ts) return "<unknown>"; time_t tt = ts; struct tm tm; -#ifdef WIN32 - gmtime_s(&tm, &tt); -#else - gmtime_r(&tt, &tm); -#endif + epee::misc_utils::get_gmt_time(tt, tm); uint64_t now = time(NULL); uint64_t diff = ts > now ? ts - now : now - ts; strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", &tm); |