diff options
Diffstat (limited to 'board.cpp')
-rw-r--r-- | board.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -211,7 +211,7 @@ QString Board::renderHumanDate(const QDateTime &dateTime) } } -QString Board::renderHumanTime(const QDateTime &dateTime) +QString Board::renderHumanDateTime(const QDateTime &dateTime) { const QDateTime now = QDateTime::currentDateTime(); QDateTime localDateTime = dateTime.toLocalTime(); @@ -478,7 +478,7 @@ bool Board::cleanDb() int total_rows = 0; q.prepare("DELETE FROM topics WHERE last_update_time < ?"); - q.bindValue(0, QDateTime::currentDateTime().addDays(-FORUM_TOPICS_CACHE)); + q.bindValue(0, QDateTime::currentDateTimeUtc().addDays(-FORUM_TOPICS_CACHE)); if (q.exec()) { total_rows += q.numRowsAffected(); } else { @@ -487,7 +487,7 @@ bool Board::cleanDb() q.prepare("DELETE FROM posts WHERE last_update_time < ?"); - q.bindValue(0, QDateTime::currentDateTime().addDays(-TOPIC_POSTS_CACHE)); + q.bindValue(0, QDateTime::currentDateTimeUtc().addDays(-TOPIC_POSTS_CACHE)); if (q.exec()) { total_rows += q.numRowsAffected(); } else { |