Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Patch to lib/multi_format_msg_sink_impl.cc
--- multi_format_msg_sink_impl.cc.old 2017-12-03 20:31:59.446158527 +0100
+++ multi_format_msg_sink_impl.cc 2017-12-03 20:31:32.509836594 +0100
@@ -22,12 +22,14 @@
#include "config.h"
#endif
+//#include <chrono>
#include <gnuradio/io_signature.h>
#include "multi_format_msg_sink_impl.h"
#include <ctime>
#include <iostream>
#include <iomanip>
+
namespace gr
{
namespace satnogs
@@ -54,7 +56,8 @@
if(d_timestamp) {
std::time_t t = std::time(nullptr);
std::tm tm = *std::localtime(&t);
- d_fos << "[" << std::put_time(&tm, "%F %T %z") << "] ";
+ char puttime[24];
+ d_fos << "[" << strftime(puttime, sizeof(puttime), "%F %T %z", &tm) << "]";
}
switch (d_format)
@@ -92,7 +95,8 @@
if(d_timestamp) {
std::time_t t = std::time(nullptr);
std::tm tm = *std::localtime(&t);
- std::cout << "[" << std::put_time(&tm, "%F %T %z") << "] ";
+ char puttime[24];
+ d_fos << "[" << strftime(puttime, sizeof(puttime), "%F %T %z", &tm) << "]";
}
switch (d_format)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment