blockchain_stats: don't use gmtime_r on Windows

In some cases, it doesn't like it (I don't know the details).

Factor into a new epee function
This commit is contained in:
moneromooo-monero 2018-11-20 22:26:50 +00:00
parent 84dd674cd0
commit 96e6b43970
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
4 changed files with 13 additions and 12 deletions

View file

@ -234,7 +234,7 @@ plot 'stats.csv' index "DATA" using (timecolumn(1,"%Y-%m-%d")):4 with lines, ''
}
time_t tt = blk.timestamp;
char timebuf[64];
gmtime_r(&tt, &currtm);
epee::misc_utils::get_gmt_time(tt, currtm);
if (!prevtm.tm_year)
prevtm = currtm;
// catch change of day