diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-04-04 23:37:52 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-04-04 23:37:52 +0200 |
commit | 37139c96f04f781b053feefdbb5b3d28b2bcfc11 (patch) | |
tree | c6a5bd9557a0442e6b5ad6fa3bae86803339cf32 /board.cpp | |
parent | 3f3a98b7e49230aabd0e557ea59e89e20537ca8a (diff) | |
download | tapasboard-37139c96f04f781b053feefdbb5b3d28b2bcfc11.tar.gz tapasboard-37139c96f04f781b053feefdbb5b3d28b2bcfc11.zip |
fix timezones on real device
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 { |