summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJanne Koskinen <janne.p.koskinen@digia.com>2009-12-22 08:56:22 (GMT)
committerJanne Koskinen <janne.p.koskinen@digia.com>2009-12-22 08:56:22 (GMT)
commit2a20705f874ddad55282f22fabfe30927729ae50 (patch)
tree113719b815f3dc295e3b10e313ef686c1d944a34 /tests
parent2c6749c38a2538639de86355856414b0d21317cf (diff)
downloadQt-2a20705f874ddad55282f22fabfe30927729ae50.zip
Qt-2a20705f874ddad55282f22fabfe30927729ae50.tar.gz
Qt-2a20705f874ddad55282f22fabfe30927729ae50.tar.bz2
Daylight savings time for Symbian.
Ask DST from Symbian's timezone server. This commit makes datetime functions slower. Small room for optimisation with keeping the server connection always open. Task-number: QTBUG-6859 Reviewed-by: Aleksandar Sasha Babic
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qdatetime/tst_qdatetime.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qdatetime/tst_qdatetime.cpp b/tests/auto/qdatetime/tst_qdatetime.cpp
index 1140402..32fa398 100644
--- a/tests/auto/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/qdatetime/tst_qdatetime.cpp
@@ -147,9 +147,16 @@ Q_DECLARE_METATYPE(QTime)
tst_QDateTime::tst_QDateTime()
{
+#ifdef Q_OS_SYMBIAN
+ // Symbian's timezone server cannot handle DST correctly for dates before year 1997
+ uint x1 = QDateTime(QDate(2000, 1, 1), QTime()).toTime_t();
+ uint x2 = QDateTime(QDate(2000, 6, 1), QTime()).toTime_t();
+ europeanTimeZone = (x1 == 946681200 && x2 == 959810400);
+#else
uint x1 = QDateTime(QDate(1990, 1, 1), QTime()).toTime_t();
uint x2 = QDateTime(QDate(1990, 6, 1), QTime()).toTime_t();
europeanTimeZone = (x1 == 631148400 && x2 == 644191200);
+#endif
}
tst_QDateTime::~tst_QDateTime()