diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-03-10 13:32:05 +0100 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2015-03-11 01:50:08 +0000 |
commit | 3dbb5263290b06b74bb5c0a4e15e86b398a759c2 (patch) | |
tree | 440c131ce59dfa764943fae14f8fcf27d5cf1bd7 /tests | |
parent | a29b7635bd1d58b29fca96bd3e7831d0ee1f6666 (diff) |
Fix regression in time zone handling
In QtScript we use the msecs since epoch conversion (JS date is based on
the concept). After a8c74ddcf78604c9038ba2a2bea81e445e4b3c58 the date
conversion test in qtscript started to fail. Instead of relying on the
code working by chance, simply update the date when setting it with
setMSecsSinceEpoch.
Task-number: QTBUG-44885
Change-Id: I9f95c9cdccea52e7d1f808f3cb9e18570ef0df13
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp index 446e56e936..e3ea0bbd2c 100644 --- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp @@ -2634,10 +2634,6 @@ void tst_QDateTime::daylightTransitions() const QVERIFY(test.isValid()); QCOMPARE(test.date(), QDate(2012, 10, 28)); QCOMPARE(test.time(), QTime(2, 0, 0)); -#if !defined(Q_OS_MAC) && !defined(Q_OS_QNX) - // Linux mktime bug uses last calculation - QEXPECT_FAIL("", "QDateTime doesn't properly support Daylight Transitions", Continue); -#endif // Q_OS_MAC QCOMPARE(test.toMSecsSinceEpoch(), standard2012 - msecsOneHour); // Add year to get to after tran FirstOccurrence @@ -2676,10 +2672,6 @@ void tst_QDateTime::daylightTransitions() const QVERIFY(test.isValid()); QCOMPARE(test.date(), QDate(2012, 10, 28)); QCOMPARE(test.time(), QTime(2, 0, 0)); -#if !defined(Q_OS_MAC) && !defined(Q_OS_QNX) - // Linux mktime bug uses last calculation - QEXPECT_FAIL("", "QDateTime doesn't properly support Daylight Transitions", Continue); -#endif // Q_OS_MAC QCOMPARE(test.toMSecsSinceEpoch(), standard2012 - msecsOneHour); // Add month to get to after tran FirstOccurrence @@ -2718,10 +2710,6 @@ void tst_QDateTime::daylightTransitions() const QVERIFY(test.isValid()); QCOMPARE(test.date(), QDate(2012, 10, 28)); QCOMPARE(test.time(), QTime(2, 0, 0)); -#if !defined(Q_OS_MAC) && !defined(Q_OS_QNX) - // Linux mktime bug uses last calculation - QEXPECT_FAIL("", "QDateTime doesn't properly support Daylight Transitions", Continue); -#endif // Q_OS_MAC QCOMPARE(test.toMSecsSinceEpoch(), standard2012 - msecsOneHour); // Add day to get to after tran FirstOccurrence |