Browse Source

add the seconds to the report time

Sven Czarnian 3 years ago
parent
commit
9f6f7c60d0
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/com/AircraftReporter.cpp

+ 3 - 2
src/com/AircraftReporter.cpp

@@ -10,6 +10,7 @@
  */
 
 #include <aman/com/AircraftReporter.h>
+#include <aman/helper/String.h>
 
 #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();