use published timestamp for blinding

This commit is contained in:
orignal 2019-04-12 14:05:07 -04:00
parent 5d5cd71714
commit 6cc6849ccc
4 changed files with 22 additions and 10 deletions

View file

@ -182,7 +182,13 @@ namespace util
void GetCurrentDate (char * date)
{
time_t t = time (nullptr);
GetDateString (GetSecondsSinceEpoch (), date);
}
void GetDateString (uint64_t timestamp, char * date)
{
using clock = std::chrono::system_clock;
auto t = clock::to_time_t (clock::time_point (std::chrono::seconds(timestamp)));
struct tm tm;
#ifdef _WIN32
gmtime_s(&tm, &t);