From 74e325edb4fb3c1cf1604f010fc86fe98aab8ba6 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Wed, 30 Mar 2022 09:06:09 +0200 Subject: [PATCH] removing \n in timestamp for json file --- slsReceiverSoftware/src/MasterAttributes.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/slsReceiverSoftware/src/MasterAttributes.cpp b/slsReceiverSoftware/src/MasterAttributes.cpp index 59de67ccd..743baeedb 100644 --- a/slsReceiverSoftware/src/MasterAttributes.cpp +++ b/slsReceiverSoftware/src/MasterAttributes.cpp @@ -76,7 +76,9 @@ void MasterAttributes::GetCommonBinaryAttributes( w->Double(BINARY_WRITER_VERSION); w->Key("Timestamp"); time_t t = time(nullptr); - w->String(ctime(&t)); + std::string sTime(ctime(&t)); + std::replace(sTime.begin(), sTime.end(), '\n', '\0'); + w->String(sTime.c_str()); w->Key("Detector Type"); w->String(sls::ToString(detType).c_str()); w->Key("Timing Mode");