diff --git a/src/modules/date/Date.cpp b/src/modules/date/Date.cpp index 6e997e015..3637c2dd7 100644 --- a/src/modules/date/Date.cpp +++ b/src/modules/date/Date.cpp @@ -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(timePoint.time_since_epoch()).count(); } - else { + else + { ss << std::put_time(&utcTime, "%Y-%m-%dT%H:%M:%SZ"); }