From a15787aafc07830bfa04d8fded1405b111b866a1 Mon Sep 17 00:00:00 2001 From: "moneromooo.monero" Date: Sun, 16 Oct 2016 12:30:37 +0100 Subject: [PATCH] TransactionHistory: fix date appearing as NaN Also make the end dates saner --- src/libwalletqt/TransactionHistory.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libwalletqt/TransactionHistory.cpp b/src/libwalletqt/TransactionHistory.cpp index 7fd7c7bc..defe561c 100644 --- a/src/libwalletqt/TransactionHistory.cpp +++ b/src/libwalletqt/TransactionHistory.cpp @@ -29,8 +29,8 @@ QList TransactionHistory::getAll() const qDeleteAll(m_tinfo); m_tinfo.clear(); - QDateTime firstDateTime = QDateTime::currentDateTime(); - QDateTime lastDateTime = QDateTime(QDate(1970, 1, 1)); + QDateTime firstDateTime = QDateTime::currentDateTime().addDays(1); // tomorrow (guard against jitter and timezones) + QDateTime lastDateTime = QDateTime(QDate(2014, 4, 18)); // the genesis block TransactionHistory * parent = const_cast(this); for (const auto i : m_pimpl->getAll()) { @@ -85,6 +85,6 @@ QDateTime TransactionHistory::lastDateTime() const TransactionHistory::TransactionHistory(Bitmonero::TransactionHistory *pimpl, QObject *parent) : QObject(parent), m_pimpl(pimpl) { - m_firstDateTime = QDateTime(QDate(1970, 1, 1)); - m_lastDateTime = QDateTime::currentDateTime(); + m_firstDateTime = QDateTime(QDate(2014, 4, 18)); // the genesis block + m_lastDateTime = QDateTime::currentDateTime().addDays(1); // tomorrow (guard against jitter and timezones) }