summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2011-01-27 10:43:05 +0000
committerdeva <deva>2011-01-27 10:43:05 +0000
commit1a748ff2826847c36e3b4859898447cac55b11d6 (patch)
tree1612afd8f3677dd4fa38526e11361c919ba01172
parent8db72a90338995daa1ef30242ed3fadce7051f6d (diff)
Remove stupid newline from end of ctime output.
-rw-r--r--server/src/macrotool/export.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/macrotool/export.cc b/server/src/macrotool/export.cc
index 150a85c..c9dcbd1 100644
--- a/server/src/macrotool/export.cc
+++ b/server/src/macrotool/export.cc
@@ -217,7 +217,10 @@ static void export_prefix(std::string prefix)
files[templ]->addcell("patientid", patientid);
files[templ]->addcell("template", templ);
time_t t = atol(timestamp.c_str());
- files[templ]->addcell("time", ctime(&t));
+ std::string timestr = ctime(&t);
+ if(timestr[timestr.size() - 1] == '\n')
+ timestr = timestr.substr(0, timestr.size() - 1);
+ files[templ]->addcell("time", timestr.c_str());
printf("%s %s %s\n", timestamp.c_str(), patientid.c_str(), templ.c_str());