summaryrefslogtreecommitdiffstats
path: root/tests/auto/qdatetime
diff options
context:
space:
mode:
authorJanne Koskinen <janne.p.koskinen@digia.com>2009-12-28 11:47:46 (GMT)
committerJanne Koskinen <janne.p.koskinen@digia.com>2009-12-28 11:47:46 (GMT)
commit7bc18035816a2eac15dfac4d987eb9bf43f90ef6 (patch)
tree14380cba8d10ea6018aee852519b1cee0f7b7473 /tests/auto/qdatetime
parentc0a4c266deeb867069b65b158ded3f7b9becfebf (diff)
downloadQt-7bc18035816a2eac15dfac4d987eb9bf43f90ef6.zip
Qt-7bc18035816a2eac15dfac4d987eb9bf43f90ef6.tar.gz
Qt-7bc18035816a2eac15dfac4d987eb9bf43f90ef6.tar.bz2
Daylight savings time for Symbian take 2
Second try to make this work for all S60 platforms
Diffstat (limited to 'tests/auto/qdatetime')
-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()