qt6-bb10/src/corelib
Edward Welbourne 3a4115d123 Return a more useful date-time on parser failure in spring-forward gap
Up to 5.15.0, QDateTime::fromString(), when parsing a string that
matched the format but represented a date-time in a spring-forward's
gap, would return an invalid date-time object that represented a "best
shot" date-time, correcting the error in the string as best it could.

In 5.15, in order to handle time-spec information correctly, we
adapted the date-time parser to have a fromString() variant that
parsed a date-time as a whole, rather than as a date and a time; as a
result, QDTP::fromString() now returns false and QDT::fromString()
returned a default-constructed instance instead of the invalid
date-time that QDTP had produced.

Amend 7605451604 to restore the prior
behavior of returning the invalid date-time object from QDTP instead
of a default-constructed invalid date-time. Also document what this
implies for the caller's ability to recover from the situation, if a
best shot result is better than nothing.

[ChangeLog][QtCore][QDateTime] Restored pre-5.15.0 behavior when
parsing a date-time from a string (and document what it implies): if
the string has the right form but represents a date-time that was
skipped by a time-zone transition (e.g. a DST spring-forward), the
invalid date-time object returned can, none the less, be used to
recover a near-by date-time that may be more useful in some cases.
From 5.15.0 to 5.15.2 and in 6.0.0, a default-constructed QDateTime
was returned in place of this more informative invalid date-time.

Task-number: QTBUG-88633
Pick-to: 6.0 5.15
Change-Id: If0b439038d5fe48eefb951c62f3aae2933bb5651
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-27 13:26:53 +01:00
..
animation Adjust code format, add space after 'if' 2020-11-16 12:53:37 +00:00
doc Doc: Improve *_CAST_FROM_ASCII documentation 2020-11-27 08:28:25 +01:00
global Update setHighDpiScaleFactorRoundingPolicy docs 2020-11-27 12:26:51 +00:00
io Also remove 0 initialization from QUrlTwoFlags 2020-11-27 12:26:51 +00:00
itemmodels Fix QSFPM not emitting dataChanged when source model is set 2020-11-18 20:57:48 +01:00
kernel QEventDispatcherWin32Private: Get rid of TimerInfo struct list 2020-11-26 08:36:44 +02:00
mimetypes Fix compilation when using -no-mimetype-database 2020-10-21 13:26:20 +00:00
platform
plugin Adjust code format, add space after 'if' 2020-11-16 12:53:37 +00:00
serialization Replace qt_make_unique with std::make_unique 2020-11-23 09:50:21 +01:00
text Return a more useful date-time on parser failure in spring-forward gap 2020-11-27 13:26:53 +01:00
thread Add convenience functions for QFuture creation 2020-11-23 09:50:21 +01:00
time Return a more useful date-time on parser failure in spring-forward gap 2020-11-27 13:26:53 +01:00
tools QCache: Fix crash observed in tst_QAccessibility 2020-11-27 07:28:24 +00:00
.prev_CMakeLists.txt CMake: Regenerate qtbase projects 2020-10-30 17:48:50 +01:00
.prev_configure.cmake Fix pcre2 feature conditions 2020-11-09 16:01:33 +01:00
CMakeLists.txt CMake: Use lower cased property name for entrypoint library opt-out 2020-11-24 20:50:21 +00:00
Qt6AndroidMacros.cmake CMake: add CMAKE_FIND_ROOT_PATH as extraPrefixDirs for androiddeployqt 2020-11-20 15:45:52 +00:00
Qt6CTestMacros.cmake CMake: Fix qtbase cmake tests to pass when configured in-tree 2020-11-10 14:23:09 +01:00
Qt6CoreConfigExtras.cmake.in cmake: Remove indirection via Startup target for EntryPoint 2020-11-12 18:43:43 +01:00
Qt6CoreConfigureFileTemplate.in CMake: Fix unnecessary rebuilding upon reconfiguration 2020-10-30 17:19:27 +01:00
Qt6CoreMacros.cmake CMake: Change generated resources naming 2020-11-24 21:51:29 +01:00
QtCore.dynlist
configure.cmake Fix pcre2 feature conditions 2020-11-09 16:01:33 +01:00
configure.json Fix pcre2 feature conditions 2020-11-09 16:01:33 +01:00
corelib.pro Android: rename Android's package name for Qt 6 2020-10-03 11:22:35 +03:00
debug_script.py
qt_cmdline.cmake CMake: Re-implement configure/qmake's command line handling in CMake 2020-08-17 08:08:20 +02:00
qtcore.tracepoints
qtzlib.pro