add the seconds to the report time
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <aman/com/AircraftReporter.h>
|
#include <aman/com/AircraftReporter.h>
|
||||||
|
#include <aman/helper/String.h>
|
||||||
|
|
||||||
#include "ZmqContext.h"
|
#include "ZmqContext.h"
|
||||||
|
|
||||||
@@ -68,8 +69,8 @@ bool AircraftReporter::send(aman::AircraftReport& report) {
|
|||||||
/* set the report time */
|
/* set the report time */
|
||||||
std::stringstream stream;
|
std::stringstream stream;
|
||||||
auto reportTime = std::chrono::utc_clock::now();
|
auto reportTime = std::chrono::utc_clock::now();
|
||||||
stream << std::format("{0:%y%m%d%H%M}", reportTime);
|
stream << std::format("{0:%y%m%d%H%M%S}", reportTime);
|
||||||
report.set_reporttime(stream.str());
|
report.set_reporttime(String::splitString(stream.str(), ".")[0]);
|
||||||
|
|
||||||
/* serialize the report */
|
/* serialize the report */
|
||||||
std::string serialized = report.SerializeAsString();
|
std::string serialized = report.SerializeAsString();
|
||||||
|
|||||||
Reference in New Issue
Block a user