Merge pull request #63

a15787a TransactionHistory: fix date appearing as NaN (moneromooo.monero)
This commit is contained in:
Riccardo Spagni 2016-10-24 10:31:12 +02:00
commit ffeeb1fa86
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD

View File

@ -29,8 +29,8 @@ QList<TransactionInfo *> TransactionHistory::getAll() const
qDeleteAll(m_tinfo); qDeleteAll(m_tinfo);
m_tinfo.clear(); m_tinfo.clear();
QDateTime firstDateTime = QDateTime::currentDateTime(); QDateTime firstDateTime = QDateTime::currentDateTime().addDays(1); // tomorrow (guard against jitter and timezones)
QDateTime lastDateTime = QDateTime(QDate(1970, 1, 1)); QDateTime lastDateTime = QDateTime(QDate(2014, 4, 18)); // the genesis block
TransactionHistory * parent = const_cast<TransactionHistory*>(this); TransactionHistory * parent = const_cast<TransactionHistory*>(this);
for (const auto i : m_pimpl->getAll()) { for (const auto i : m_pimpl->getAll()) {
@ -85,6 +85,6 @@ QDateTime TransactionHistory::lastDateTime() const
TransactionHistory::TransactionHistory(Bitmonero::TransactionHistory *pimpl, QObject *parent) TransactionHistory::TransactionHistory(Bitmonero::TransactionHistory *pimpl, QObject *parent)
: QObject(parent), m_pimpl(pimpl) : QObject(parent), m_pimpl(pimpl)
{ {
m_firstDateTime = QDateTime(QDate(1970, 1, 1)); m_firstDateTime = QDateTime(QDate(2014, 4, 18)); // the genesis block
m_lastDateTime = QDateTime::currentDateTime(); m_lastDateTime = QDateTime::currentDateTime().addDays(1); // tomorrow (guard against jitter and timezones)
} }