Skip to content

Commit

Permalink
Fix static Windows build error in util time
Browse files Browse the repository at this point in the history
  • Loading branch information
AmirAbrams committed Jul 7, 2021
1 parent da099d7 commit 012e86f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utiltime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ std::string DurationToDHMS(int64_t nDurationTime)
std::string FormatISO8601DateTime(int64_t nTime) {
struct tm ts;
time_t time_val = nTime;
#ifdef _MSC_VER
#if defined(WIN32)
gmtime_s(&ts, &time_val);
#else
gmtime_r(&time_val, &ts);
Expand All @@ -124,7 +124,7 @@ std::string FormatISO8601DateTime(int64_t nTime) {
std::string FormatISO8601Date(int64_t nTime) {
struct tm ts;
time_t time_val = nTime;
#ifdef _MSC_VER
#if defined(WIN32)
gmtime_s(&ts, &time_val);
#else
gmtime_r(&time_val, &ts);
Expand Down

0 comments on commit 012e86f

Please sign in to comment.