diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-11-20 22:26:50 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-11-21 00:50:53 +0000 |
commit | 96e6b439705cff5806974bb34e4b46db40dd3dbd (patch) | |
tree | 20fe64f9b065f41dfe904be19249bf5cc33a86ee /src/simplewallet | |
parent | Merge pull request #4781 (diff) | |
download | monero-96e6b439705cff5806974bb34e4b46db40dd3dbd.tar.xz |
blockchain_stats: don't use gmtime_r on Windows
In some cases, it doesn't like it (I don't know the details).
Factor into a new epee function
Diffstat (limited to 'src/simplewallet')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index d9fd0c13e..1c431ade6 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -6727,11 +6727,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); |