qt5base-lts/tests/auto/corelib/time
Edward Welbourne 653c1aab18 Fix handling of trailing space at the end of an ISO date-time
If milliseconds were followed by a space, the space was included in
the count of "digits" read as the fractional part; since we read (up
to) four digits (so that we round correctly if extras are given), a
harmless apce could cause scaling down by too large a power of ten.

Since QString::toInt() ignores leading space, we were also allowing
interior space at the start of the milliseconds, which we should not,
so catch that at the same time.  Added tests, including one for the
rounding that's the reason for reading the extra digit, when present.

Fixes: QTBUG-80445
Change-Id: I606b29a94818a101f45c8b59a0f5d1f78893d78f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-06 14:46:48 +01:00
..
qcalendar Rename calendar methods from m{in,ax} to m{in,ax}imum 2019-09-04 18:43:35 +02:00
qdate Be consistent in the RFC2822Date invalid character tests 2019-11-27 18:27:43 +01:00
qdatetime Fix handling of trailing space at the end of an ISO date-time 2019-12-06 14:46:48 +01:00
qtime Be consistent in the RFC2822Date invalid character tests 2019-11-27 18:27:43 +01:00
qtimezone Work around macOS's inconsistency in naming of India's time-zone 2019-11-28 14:16:33 +01:00
time.pro Add support for calendars beside Gregorian 2019-08-20 13:41:21 +02:00