Make the dates into a proper UNIX timestamp

This commit is contained in:
fireice-uk
2017-07-18 21:49:50 +01:00
parent 7a6842dbd9
commit 7b05d55926
+6 -2
View File
@@ -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<seconds>(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<seconds>(vMineResults[i].time.time_since_epoch()).count()),
vSocketLog[i].msg.c_str());
cn_error.append(buffer);
}