From 7b05d559260e9a1ae2f655b89a953457a34ed473 Mon Sep 17 00:00:00 2001 From: fireice-uk Date: Tue, 18 Jul 2017 21:49:50 +0100 Subject: Make the dates into a proper UNIX timestamp --- executor.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'executor.cpp') diff --git a/executor.cpp b/executor.cpp index 6388c4b..4e5917d 100644 --- a/executor.cpp +++ b/executor.cpp @@ -898,10 +898,12 @@ void executor::http_json_report(std::string& out) char buffer[256]; for(size_t i=1; i < vMineResults.size(); i++) { + using namespace std::chrono; if(i != 0) res_error.append(1, ','); snprintf(buffer, sizeof(buffer), sJsonApiResultError, int_port(vMineResults[i].count), - int_port(vMineResults[i].time.time_since_epoch().count()), vMineResults[i].msg.c_str()); + int_port(duration_cast(vMineResults[i].time.time_since_epoch()).count()), + vMineResults[i].msg.c_str()); res_error.append(buffer); } @@ -917,10 +919,12 @@ void executor::http_json_report(std::string& out) cn_error.reserve(vSocketLog.size() * 128); for(size_t i=0; i < vSocketLog.size(); i++) { + using namespace std::chrono; if(i != 0) cn_error.append(1, ','); snprintf(buffer, sizeof(buffer), sJsonApiConnectionError, - int_port(vSocketLog[i].time.time_since_epoch().count()), vSocketLog[i].msg.c_str()); + int_port(duration_cast(vMineResults[i].time.time_since_epoch()).count()), + vSocketLog[i].msg.c_str()); cn_error.append(buffer); } -- cgit v1.1