diff options
author | Honglei Zhang <honglei.zhang@nokia.com> | 2011-05-29 11:19:35 +0300 |
---|---|---|
committer | Honglei Zhang <honglei.zhang@nokia.com> | 2011-05-29 11:19:35 +0300 |
commit | 706fc1c894addd6602470b25aba686491c891a14 (patch) | |
tree | b6aa487033a6b347e46aeda91651d2caf01465b4 /tests/auto/qdatetime | |
parent | 8f3b6f7b294b9ad52e9fdc812f13f1e7b7720e0d (diff) |
Fix bug about daylight saving missing on Symbian platfrom.
Daylight saving support for QDateTime is missing from Symbian
platform. This is bug fix for QTBUG-6859. This bug was fixed by
commit 2a20705. However, this original fix was removed by 01cf310d2
because of different implementation before S60 5.0 platform. This
fix is re-applied since Qt is not going to support S60 3.x platform.
Task-number: QTBUG-6859
Reviewed-by: Trust Me
Diffstat (limited to 'tests/auto/qdatetime')
-rw-r--r-- | tests/auto/qdatetime/qdatetime.pro | 4 | ||||
-rw-r--r-- | tests/auto/qdatetime/tst_qdatetime.cpp | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/tests/auto/qdatetime/qdatetime.pro b/tests/auto/qdatetime/qdatetime.pro index 08a321ef75..a3f309179e 100644 --- a/tests/auto/qdatetime/qdatetime.pro +++ b/tests/auto/qdatetime/qdatetime.pro @@ -1,5 +1,4 @@ load(qttest_p4) - SOURCES += tst_qdatetime.cpp QT = core @@ -10,6 +9,5 @@ win32-msvc|win32-msvc9x { QMAKE_CFLAGS_RELEASE -= -O1 QMAKE_CXXFLAGS_RELEASE -= -O1 } - - CONFIG += parallel_test +HEADERS = tst_qdatetime.loc diff --git a/tests/auto/qdatetime/tst_qdatetime.cpp b/tests/auto/qdatetime/tst_qdatetime.cpp index 95995e857b..5462250588 100644 --- a/tests/auto/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/qdatetime/tst_qdatetime.cpp @@ -155,9 +155,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() |