summaryrefslogtreecommitdiff
path: root/forummodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'forummodel.cpp')
-rw-r--r--forummodel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/forummodel.cpp b/forummodel.cpp
index 7606f93..aecb8c2 100644
--- a/forummodel.cpp
+++ b/forummodel.cpp
@@ -125,7 +125,7 @@ void ForumModel::fetchMore(const QModelIndex &parent)
if (!topics.empty()) {
QDateTime last = oldestPostUpdate(topics);
// If the topics we got from DB are too old, refresh online.
- if (last.secsTo(QDateTime::currentDateTime()) > FORUM_TOPICS_TLL) {
+ if (last.secsTo(QDateTime::currentDateTimeUtc()) > FORUM_TOPICS_TLL) {
qDebug() << "Fetching topics because of old";
Q_ASSERT(new_end > 0);
_board->enqueueAction(new FetchTopicsAction(_forumId,
@@ -163,7 +163,7 @@ QDateTime ForumModel::parseDateTime(const QVariant &v)
QDateTime ForumModel::oldestPostUpdate(const QList<Topic> &topics)
{
- if (topics.empty()) return QDateTime::currentDateTime();
+ if (topics.empty()) return QDateTime::currentDateTimeUtc();
QDateTime min = topics.first().last_update_time;
foreach (const Topic& topic, topics) {
if (min < topic.last_update_time) min = topic.last_update_time;
@@ -299,7 +299,7 @@ void ForumModel::update()
if (!_board->service()->isAccessible()) return;
QDateTime last = lastTopPostUpdate();
if (!last.isValid() ||
- last.secsTo(QDateTime::currentDateTime()) > FORUM_TOP_TLL) {
+ last.secsTo(QDateTime::currentDateTimeUtc()) > FORUM_TOP_TLL) {
// Outdated or empty, refresh.
qDebug() << "Fetching topics because the top are old";
_board->enqueueAction(new FetchTopicsAction(_forumId, 0, FORUM_PAGE_SIZE - 1, _board));