summaryrefslogtreecommitdiff
path: root/board.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-04-04 23:37:52 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-04-04 23:37:52 +0200
commit37139c96f04f781b053feefdbb5b3d28b2bcfc11 (patch)
treec6a5bd9557a0442e6b5ad6fa3bae86803339cf32 /board.cpp
parent3f3a98b7e49230aabd0e557ea59e89e20537ca8a (diff)
downloadtapasboard-37139c96f04f781b053feefdbb5b3d28b2bcfc11.tar.gz
tapasboard-37139c96f04f781b053feefdbb5b3d28b2bcfc11.zip
fix timezones on real device
Diffstat (limited to 'board.cpp')
-rw-r--r--board.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/board.cpp b/board.cpp
index bc9f4e7..5878475 100644
--- a/board.cpp
+++ b/board.cpp
@@ -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 {