qt5base-lts/tests/auto/corelib/time/qdatetime
Edward Welbourne cb0ecd6b6d Check value is in range when setting a QDateTime
Previously, a QDate representing more than about 0.3 gigayears before
or after the epoch would overflow the millisecond count and produce a
"valid" date-time that didn't represent the date and time passed to
its constructor.  Changed to detect such overflow and produce an
invalid date-time instead, if it happens.

Corrected some tests that wrongly expected to be able to represent
extreme date-time values with every time-spec.  The (milli)seconds
since epoch are from UTC's epoch, so converting to another offset,
zone or local time may give a value outside the actual range.  Added
some tests for the actual exact bounds.

Task-number: QTBUG-68855
Change-Id: I866a4974aeb54bba92dbe7eab0a440baf02124f0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-10-09 01:09:42 +02:00
..
.gitignore Separate out the time, zone, date code from corelib/tools/ 2019-06-06 15:54:32 +02:00
CMakeLists.txt CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
qdatetime.pro Use ranged for loops in place of foreach in QTimeZone tests 2020-06-23 16:59:45 +02:00
tst_qdatetime_mac.mm Purge from Q(Date|Time)+ most things marked to go at Qt 6 2020-05-05 15:34:15 +02:00
tst_qdatetime.cpp Check value is in range when setting a QDateTime 2020-10-09 01:09:42 +02:00