qt5base-lts/tests/auto/corelib/time/qtimezone
Edward Welbourne 828f533b32 Check POSIX rules during QTzTimeZone creation
Previously, an apparent POSIX rule would be saved and any defects in
it would only be discovered when trying to use it to generate
transitions. Instead, check that it has the right form during the
initial parsing of its data.

In the process, since checking for DST in the process is trivial,
implement a long-standing TODO to cache hasDaylightTime()'s
answer. The array it scanned was in any case being scanned during
construction, so detecting DST in init()'s scan is trivial; and its
failure to check the POSIX rule mean it failed to notice when zones
entirely specified by a POSIX rule have DST.

Adapt a test using a POSIX-only rule to verify it does know the zone
has DST; it did not, before this change.

Change-Id: I690c013d3331600f7348dae61c35d41e5599da70
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-27 14:12:35 +02:00
..
CMakeLists.txt CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
tst_qtimezone_darwin.mm Replace QtTest headers with QTest 2020-12-22 15:20:30 +01:00
tst_qtimezone.cpp Check POSIX rules during QTzTimeZone creation 2021-04-27 14:12:35 +02:00