summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2023-03-24 15:09:48 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-04-14 16:22:07 +0000
commit28b2428992dfa481f59a3501295133bec8eb4980 (patch)
tree8dee8e861d80c5149f267beb26fa1086419199c2 /tests
parentb220c5d7dc35a8288c66fe23afd64ff3bacea51b (diff)
downloadqtbase-28b2428992dfa481f59a3501295133bec8eb4980.tar.gz
Correct time zone in tst_QDateTimeEdit::stepIntoDSTGap()
Given that QDTE only supports local time and UTC, using Europe/Oslo as zone was disconnected from reality, especially as various QDateTime()s were constructed using local time. Use the system zone. Change-Id: I95b3a6a6acf9ffc2b8c7f05d3dd9440ff173abfe Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 919d2e0c5a844da1ca87b554fb7b8060a520e640) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
index 0273fbd6c3..96726e19cc 100644
--- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
@@ -4697,7 +4697,7 @@ void tst_QDateTimeEdit::stepIntoDSTGap_data()
QTest::addColumn<int>("steps");
QTest::addColumn<QDateTime>("end");
- const QTimeZone timeZone = QTimeZone("Europe/Oslo");
+ const QTimeZone timeZone = QTimeZone::systemTimeZone();
if (!timeZone.hasDaylightTime())
QSKIP("This test needs to run in a timezone that observes DST!");