From 9f6f7c60d031f007b72ede63186cca8ba1c39416 Mon Sep 17 00:00:00 2001 From: Sven Czarnian Date: Mon, 11 Oct 2021 09:46:47 +0200 Subject: [PATCH] add the seconds to the report time --- src/com/AircraftReporter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/AircraftReporter.cpp b/src/com/AircraftReporter.cpp index 192d2ab..b222f9a 100644 --- a/src/com/AircraftReporter.cpp +++ b/src/com/AircraftReporter.cpp @@ -10,6 +10,7 @@ */ #include +#include #include "ZmqContext.h" @@ -68,8 +69,8 @@ bool AircraftReporter::send(aman::AircraftReport& report) { /* set the report time */ std::stringstream stream; auto reportTime = std::chrono::utc_clock::now(); - stream << std::format("{0:%y%m%d%H%M}", reportTime); - report.set_reporttime(stream.str()); + stream << std::format("{0:%y%m%d%H%M%S}", reportTime); + report.set_reporttime(String::splitString(stream.str(), ".")[0]); /* serialize the report */ std::string serialized = report.SerializeAsString();