diff options
| author | Edward Welbourne <edward.welbourne@qt.io> | 2023-04-25 15:14:12 +0200 |
|---|---|---|
| committer | Edward Welbourne <edward.welbourne@qt.io> | 2023-05-02 17:03:27 +0200 |
| commit | 79340518d761ec57f93c01326dc3fc13c948370c (patch) | |
| tree | b882bff0c27b1658e1d0486271523994ef9069ed /src/corelib/kernel/qtimer.cpp | |
| parent | c888153655ae2615eb9efa2dfc683e1b7d5ae46c (diff) | |
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>
Diffstat (limited to 'src/corelib/kernel/qtimer.cpp')
0 files changed, 0 insertions, 0 deletions
