qt6-bb10/tests/auto/corelib/time
Edward Welbourne 4e675cb85e Handle trailing cruft consistently in Qt::DateFormat parsing
Previously the ISO time format would tolerate trailing cruft at the
end in various cases even though there might be an offset specifier
after the time, which should *not* be separated from it by anything
(not even the spaces we originally planned to still tolerate).

The RFC date format is forgiving about space, as is suitable for
parsing of RFC-822 headers, but the other formats should match the
handling in QDateTimeParser, which rejects any dangling cruft.

At the same time, since this required a re-write of
fromIsoTimeString() in any case, add support for the ISO format that
gives the hour a fractional part and skips minutes and
seconds. Previously we only had support for fractional minutes (with
no seconds). The hour without even a fractional part is also valid.

Reworked the documentation of Qt::DateFormat as it was wrong in
places, inconsistent in its formatting and incomplete. Adjusted some
tests to match the new behavior. A fraction separator with no
following digits should have been recognized as an error previously
and now is.

[ChangeLog][QtCore][QDateTime] The ISODate and ISODateWithMs formats
now reject trailing cruft (including spaces) at the end of a time
string. They also gain support for parsing hour-only formats,
including the hour-with-fractional-part format.

Task-number: QTBUG-86133
Change-Id: I38ad1479ae033407f7df97ffbeb7c4bcd463d04a
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-03 07:09:57 +02:00
..
qcalendar CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
qdate Add unit test to check emoji handling in date-time parsing 2020-09-23 16:59:07 +02:00
qdatetime Handle trailing cruft consistently in Qt::DateFormat parsing 2020-10-03 07:09:57 +02:00
qtime Give some QTime test-cases more informative names 2020-10-01 23:14:06 +02:00
qtimezone CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
CMakeLists.txt Update tests/auto/corelib/time/'s CMake config 2020-07-02 15:35:17 +02:00
time.pro Make qtbase compile without QT_CONFIG(timezone) 2020-05-11 14:42:00 +03:00