From a934767ffb59de408f01d6549b51696c476d3f7e Mon Sep 17 00:00:00 2001 From: Sven Czarnian Date: Sun, 10 Oct 2021 21:32:05 +0200 Subject: [PATCH] add the reported timestamp --- src/com/AircraftReporter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/com/AircraftReporter.cpp b/src/com/AircraftReporter.cpp index 27a452b..192d2ab 100644 --- a/src/com/AircraftReporter.cpp +++ b/src/com/AircraftReporter.cpp @@ -65,6 +65,12 @@ bool AircraftReporter::send(aman::AircraftReport& report) { bool retval = false; if (nullptr != this->m_socket) { + /* 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()); + /* serialize the report */ std::string serialized = report.SerializeAsString(); zmq::message_t message(serialized.size());