mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-23 19:15:56 +00:00
TransactionHistory: fix date appearing as NaN
Also make the end dates saner
This commit is contained in:
parent
05046a5f21
commit
a15787aafc
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue