diff options
| author | Riccardo Spagni <ric@spagni.net> | 2018-12-20 12:33:59 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2018-12-20 12:33:59 +0200 |
| commit | c8fc06c7b6d78c83c50f96a0084f670c5670ef8b (patch) | |
| tree | cb200f15b8038462a38c0051c34408d65de36f00 /src/common/util.cpp | |
| parent | 6bc0c7e6850d9b35ce48e3a7f494be95f5247604 (diff) | |
| parent | 1ebcd7b9b0b6c6a81d7439a4ba717df364c94db8 (diff) | |
| download | monzero-core-c8fc06c7b6d78c83c50f96a0084f670c5670ef8b.tar.gz monzero-core-c8fc06c7b6d78c83c50f96a0084f670c5670ef8b.tar.xz monzero-core-c8fc06c7b6d78c83c50f96a0084f670c5670ef8b.zip | |
Merge pull request #4849
1ebcd7b9 MMS (Multisig Messaging System): Initial version (rbrunner7)
Diffstat (limited to 'src/common/util.cpp')
| -rw-r--r-- | src/common/util.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/common/util.cpp b/src/common/util.cpp index 58b0d8210..448f792ff 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -58,6 +58,7 @@ #include "include_base_utils.h" #include "file_io_utils.h" #include "wipeable_string.h" +#include "misc_os_dependent.h" using namespace epee; #include "crypto/crypto.h" @@ -1025,4 +1026,15 @@ std::string get_nix_version_display_string() #endif } + std::string get_human_readable_timestamp(uint64_t ts) + { + char buffer[64]; + if (ts < 1234567890) + return "<unknown>"; + 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); + return std::string(buffer); + } } |
