Skip to content

Instantly share code, notes, and snippets.

@cyber-atomus
Created December 3, 2017 20:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cyber-atomus/5b7f974c49ccfde68a075bd588c558bb to your computer and use it in GitHub Desktop.
Save cyber-atomus/5b7f974c49ccfde68a075bd588c558bb to your computer and use it in GitHub Desktop.
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