Skip to content
Snippets Groups Projects
Commit 7b05d559 authored by fireice-uk's avatar fireice-uk
Browse files

Make the dates into a proper UNIX timestamp

parent 7a6842db
No related branches found
No related tags found
No related merge requests found
...@@ -898,10 +898,12 @@ void executor::http_json_report(std::string& out) ...@@ -898,10 +898,12 @@ void executor::http_json_report(std::string& out)
char buffer[256]; char buffer[256];
for(size_t i=1; i < vMineResults.size(); i++) for(size_t i=1; i < vMineResults.size(); i++)
{ {
using namespace std::chrono;
if(i != 0) res_error.append(1, ','); if(i != 0) res_error.append(1, ',');
snprintf(buffer, sizeof(buffer), sJsonApiResultError, int_port(vMineResults[i].count), 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<seconds>(vMineResults[i].time.time_since_epoch()).count()),
vMineResults[i].msg.c_str());
res_error.append(buffer); res_error.append(buffer);
} }
...@@ -917,10 +919,12 @@ void executor::http_json_report(std::string& out) ...@@ -917,10 +919,12 @@ void executor::http_json_report(std::string& out)
cn_error.reserve(vSocketLog.size() * 128); cn_error.reserve(vSocketLog.size() * 128);
for(size_t i=0; i < vSocketLog.size(); i++) for(size_t i=0; i < vSocketLog.size(); i++)
{ {
using namespace std::chrono;
if(i != 0) cn_error.append(1, ','); if(i != 0) cn_error.append(1, ',');
snprintf(buffer, sizeof(buffer), sJsonApiConnectionError, snprintf(buffer, sizeof(buffer), sJsonApiConnectionError,
int_port(vSocketLog[i].time.time_since_epoch().count()), vSocketLog[i].msg.c_str()); int_port(duration_cast<seconds>(vMineResults[i].time.time_since_epoch()).count()),
vSocketLog[i].msg.c_str());
cn_error.append(buffer); cn_error.append(buffer);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment