Skip to content

Commit

Permalink
Fixed a timestamp conversion error that failed on MinGW and MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-bodhi committed Dec 30, 2023
1 parent de56878 commit de800ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/modules/date/Date.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ std::string serializeTimePoint(const auto& timePoint, Date::DateFormat dateForma

if (dateFormat == Date::DateFormat::Timestamp)
{
ss << std::put_time(&utcTime, "%s");
ss << std::chrono::duration_cast<std::chrono::seconds>(timePoint.time_since_epoch()).count();
}

else {
else
{
ss << std::put_time(&utcTime, "%Y-%m-%dT%H:%M:%SZ");
}

Expand Down

0 comments on commit de800ea

Please sign in to comment.