mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
use published timestamp for blinding
This commit is contained in:
parent
5d5cd71714
commit
6cc6849ccc
4 changed files with 22 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue