aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-12-04 17:29:46 +0200
committerRiccardo Spagni <ric@spagni.net>2018-12-04 17:29:46 +0200
commitd4a0fb2b895f073c0852bdd42cd05ef4eeb21e3c (patch)
tree71f245b66e10da5d95b48925bdadbcde5d7e3493 /src/simplewallet
parentMerge pull request #4878 (diff)
parentblockchain_stats: don't use gmtime_r on Windows (diff)
downloadmonero-d4a0fb2b895f073c0852bdd42cd05ef4eeb21e3c.tar.xz
Merge pull request #4880
96e6b439 blockchain_stats: don't use gmtime_r on Windows (moneromooo-monero)
Diffstat (limited to 'src/simplewallet')
-rw-r--r--src/simplewallet/simplewallet.cpp6
1 files changed, 1 insertions, 5 deletions
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);