From e8479675a8a9e9e73314eb49b6b127a391a50101 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 13 Jan 2017 18:03:28 +0400 Subject: [PATCH] show local time in Masternodes tab (#1244) --- src/qt/forms/masternodelist.ui | 4 ++-- src/qt/masternodelist.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qt/forms/masternodelist.ui b/src/qt/forms/masternodelist.ui index 437f3c634..d01254dd0 100644 --- a/src/qt/forms/masternodelist.ui +++ b/src/qt/forms/masternodelist.ui @@ -129,7 +129,7 @@ - Last Seen (UTC) + Last Seen @@ -252,7 +252,7 @@ - Last Seen (UTC) + Last Seen diff --git a/src/qt/masternodelist.cpp b/src/qt/masternodelist.cpp index 4cf0b6dd3..2ffa9f9c4 100644 --- a/src/qt/masternodelist.cpp +++ b/src/qt/masternodelist.cpp @@ -188,7 +188,7 @@ void MasternodeList::updateMyMasternodeInfo(QString strAlias, QString strAddr, C QTableWidgetItem *protocolItem = new QTableWidgetItem(QString::number(pmn ? pmn->nProtocolVersion : -1)); QTableWidgetItem *statusItem = new QTableWidgetItem(QString::fromStdString(pmn ? pmn->GetStatus() : "MISSING")); QTableWidgetItem *activeSecondsItem = new QTableWidgetItem(QString::fromStdString(DurationToDHMS(pmn ? (pmn->lastPing.sigTime - pmn->sigTime) : 0))); - QTableWidgetItem *lastSeenItem = new QTableWidgetItem(QString::fromStdString(DateTimeStrFormat("%Y-%m-%d %H:%M", pmn ? pmn->lastPing.sigTime : 0))); + QTableWidgetItem *lastSeenItem = new QTableWidgetItem(QString::fromStdString(DateTimeStrFormat("%Y-%m-%d %H:%M", pmn ? pmn->lastPing.sigTime + QDateTime::currentDateTime().offsetFromUtc() : 0))); QTableWidgetItem *pubkeyItem = new QTableWidgetItem(QString::fromStdString(pmn ? CBitcoinAddress(pmn->pubKeyCollateralAddress.GetID()).ToString() : "")); ui->tableWidgetMyMasternodes->setItem(nNewRow, 0, aliasItem); @@ -259,7 +259,7 @@ void MasternodeList::updateNodeList() QTableWidgetItem *protocolItem = new QTableWidgetItem(QString::number(mn.nProtocolVersion)); QTableWidgetItem *statusItem = new QTableWidgetItem(QString::fromStdString(mn.GetStatus())); QTableWidgetItem *activeSecondsItem = new QTableWidgetItem(QString::fromStdString(DurationToDHMS(mn.lastPing.sigTime - mn.sigTime))); - QTableWidgetItem *lastSeenItem = new QTableWidgetItem(QString::fromStdString(DateTimeStrFormat("%Y-%m-%d %H:%M", mn.lastPing.sigTime))); + QTableWidgetItem *lastSeenItem = new QTableWidgetItem(QString::fromStdString(DateTimeStrFormat("%Y-%m-%d %H:%M", mn.lastPing.sigTime + QDateTime::currentDateTime().offsetFromUtc()))); QTableWidgetItem *pubkeyItem = new QTableWidgetItem(QString::fromStdString(CBitcoinAddress(mn.pubKeyCollateralAddress.GetID()).ToString())); if (strCurrentFilter != "")