qt5base-lts/tests/auto/corelib/time
Edward Welbourne 79340518d7 tst_QDateTime::springForward(): adapt tests for midnight transitions
The second pass through each test case, going via UTC, applied an
adjustment to the time; however QTime wraps around modulo the day, so
applying a negative adjustment to a time too near the start of the day
could produce a time at the end of the day. I'm preparing to add some
test-case variants for which the transition's UTC date differs from
the date in the zone doing it, which trigger this. Combine the time
with the date before applying the adjustment, so that the date gets
decremented to match the time's wrap-around and conversion from UTC
duly gets back to the correct place, not a day later. The new test
cases (in an imminent commit) thus pass.

Change-Id: I1bd5f191c7673a56ac3fbfc69eab0bc03c9e40b3
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2023-05-02 17:03:27 +02:00
..
qcalendar tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qdate QDate: use more constexpr vars instead of plain numbers 2023-04-22 20:04:30 +02:00
qdatetime tst_QDateTime::springForward(): adapt tests for midnight transitions 2023-05-02 17:03:27 +02:00
qdatetimeparser tst_QDateTimeParser::intermediateYear(): adapt for Indian/Cocos zone 2023-04-14 15:21:39 +02:00
qtime tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qtimezone Change QTimeZone's offset range into constants, not an enum 2023-04-28 16:13:25 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00