From 12ad6748a4a03d0f1ba64ec2c5f392f94b363318 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 1 Jan 2023 10:38:13 +0000 Subject: [PATCH] util: make GMT timestamps explicit for clarity For privacy reasons, time functions use GMT, to avoid logs leaking timezones. It'd make more sense to use localtime for wallet output (which are not logged by default), but that adds inconsistencies which can also be confusing. So add a Z suffix for now to make it clear these are not local time. --- src/common/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/util.cpp b/src/common/util.cpp index 1a7b9b544..b618ffe06 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -1067,7 +1067,7 @@ std::string get_nix_version_display_string() time_t tt = ts; struct tm tm; misc_utils::get_gmt_time(tt, tm); - strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", &tm); + strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%SZ", &tm); return std::string(buffer); }