Skip to content

Commit

Permalink
Merge pull request monero-project#4849
Browse files Browse the repository at this point in the history
1ebcd7b MMS (Multisig Messaging System): Initial version (rbrunner7)
  • Loading branch information
fluffypony committed Dec 20, 2018
2 parents 6bc0c7e + 1ebcd7b commit c8fc06c
Show file tree
Hide file tree
Showing 12 changed files with 3,882 additions and 132 deletions.
12 changes: 12 additions & 0 deletions src/common/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
}
}
2 changes: 2 additions & 0 deletions src/common/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,6 @@ namespace tools
#endif

void closefrom(int fd);

std::string get_human_readable_timestamp(uint64_t ts);
}
Loading

0 comments on commit c8fc06c

Please sign in to comment.