From 56e45bc64c69681049e75158f7c077ab9aec3a36 Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Sun, 28 Oct 2018 11:16:57 -0700 Subject: [PATCH] msec fixes --- src/senttxstore.cpp | 2 +- src/txtablemodel.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/senttxstore.cpp b/src/senttxstore.cpp index 8c9c7f5..b915d68 100644 --- a/src/senttxstore.cpp +++ b/src/senttxstore.cpp @@ -87,7 +87,7 @@ void SentTxStore::addToSentTx(Tx tx, QString txid) { QJsonObject txItem; txItem["type"] = "sent"; txItem["from"] = tx.fromAddr; - txItem["datetime"] = QDateTime().currentMSecsSinceEpoch(); + txItem["datetime"] = QDateTime().currentMSecsSinceEpoch() / 1000; txItem["address"] = QString(); // The sent address is blank, to be consistent with t-Addr sent behaviour txItem["txid"] = txid; txItem["amount"] = -totalAmount; diff --git a/src/txtablemodel.cpp b/src/txtablemodel.cpp index 96fbe3b..1d3a6cb 100644 --- a/src/txtablemodel.cpp +++ b/src/txtablemodel.cpp @@ -98,7 +98,7 @@ void TxTableModel::updateAllData() { else return addr; } - case 2: return QDateTime::fromMSecsSinceEpoch(modeldata->at(index.row()).datetime).toLocalTime().toString(); + case 2: return QDateTime::fromMSecsSinceEpoch(modeldata->at(index.row()).datetime * 1000).toLocalTime().toString(); case 3: return Settings::getInstance()->getZECDisplayFormat(modeldata->at(index.row()).amount); } } @@ -114,7 +114,7 @@ void TxTableModel::updateAllData() { else return addr; } - case 2: return QDateTime::fromMSecsSinceEpoch(modeldata->at(index.row()).datetime).toLocalTime().toString(); + case 2: return QDateTime::fromMSecsSinceEpoch(modeldata->at(index.row()).datetime * 1000).toLocalTime().toString(); case 3: return Settings::getInstance()->getUSDFormat(modeldata->at(index.row()).amount); } }