qt5base-lts/tests/auto/corelib/time
Edward Welbourne ba23507960 Fix handling of time-zone gap in QTimeZonePrivate::dataForLocalTime()
This was handled correctly when the backend supplies transitions
bracketing the time in question, but the fallback code tried to use
the DST offset at the time with larger offset from UTC; this did not
work when the gap was due to a change in standard time. Discovered by
ANS1 parsing of a date-time with two-digit year, for which the
date-time parser tried to use 1921-05-01T00:00 local time when filling
in the fields it had parsed; but, when run in Europe/Helsinki, there
is no such time due to the 20m 11s skipped when joining EET from the
prior local solar mean time.

Correct the calculation to use the actual change in offset from UTC,
as used in the (far better tested) between-transitions branch of the
code, rather than the DST offset after the transition.

Add a test-case based on the ASN.1 certificate date whose parsing
revealed the issue. Although it seems nothing in Coin can reproduce
the issue, the reporter has verified that the test does indeed fail on
the system where the bug was found and the fix does fix it.

Fixes: QTBUG-96861
Pick-to: 6.2
Change-Id: I12b02bad01daca2073d1a356452cd573684aa688
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-12 22:52:50 +02:00
..
qcalendar Remove the qmake project files 2021-01-07 15:32:28 +01:00
qdate Make QDate's text round-trip test do actual comparisons 2021-02-11 11:46:04 +01:00
qdatetime Fix handling of time-zone gap in QTimeZonePrivate::dataForLocalTime() 2021-10-12 22:52:50 +02:00
qdatetimeparser Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtime Add new am/pm format-specifier that preserves locale's case 2021-09-08 20:28:40 +02:00
qtimezone Remove conditioning on Android embedded 2021-09-17 17:30:14 +02:00
CMakeLists.txt Add unit tests for qdatetimeparser 2020-10-23 20:33:18 +02:00