summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp')
-rw-r--r--tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
index 8c0f32bb74..7d51696fe3 100644
--- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
@@ -48,7 +48,7 @@
#include <private/qdatetime_p.h>
#ifdef Q_OS_WIN
-# include <windows.h>
+# include <qt_windows.h>
# if defined(Q_OS_WINRT)
# define tzset()
# endif
@@ -2906,6 +2906,12 @@ void tst_QDateTime::timeZones() const
// - Test 03:00:00 = 1 hour after tran
hourAfterStd = QDateTime(QDate(2013, 10, 27), QTime(3, 0, 0), cet);
QCOMPARE(hourAfterStd.toMSecsSinceEpoch(), dstToStdMSecs + 3600000);
+
+ // Test Time Zone that has transitions but no future transitions afer a given date
+ QTimeZone sgt("Asia/Singapore");
+ QDateTime future(QDate(2015, 1, 1), QTime(0, 0, 0), sgt);
+ QVERIFY(future.isValid());
+ QCOMPARE(future.offsetFromUtc(), 28800);
}
void tst_QDateTime::invalid() const