qt5base-lts/tests/auto/corelib/time
Edward Welbourne 8286daba03 MS TZ data: avoid calculating a date in year 0
There is no year 0 in the proleptic Gregorian calendar, so QDate()
won't be happy if asked for a date in it. Tweak scanning of the data
we get from MS-Win so as to avoid a date calculation that could
otherwise happen in year 0 when constructing
QDateTime(QDate(1, 1, 1), QTime(0, 0, 0), QTimeZone("Australia/Sydney")).

Added a test for this case, which Oliver Wolff has kindly verified
does reproduce the assertion failure. However, Coin is unable to
reproduce, as all its MS builds are configured with -release, so
Q_ASSERT() does nothing. (The relevant code then skips over year 0,
albeit for the wrong reasons, and gets the right results, albeit
inefficiently, leaving no other symptom by which to detect the
problem.)

Fixes: QTBUG-78051
Change-Id: Ife8a7470e5bd450bc421e89b3f1e1211756fc889
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-09-13 10:47:41 +02:00
..
qcalendar Rename calendar methods from m{in,ax} to m{in,ax}imum 2019-09-04 18:43:35 +02:00
qdate Remove usages of deprecated APIs from QDateTime 2019-07-02 09:49:36 +02:00
qdatetime MS TZ data: avoid calculating a date in year 0 2019-09-13 10:47:41 +02:00
qtime Separate out the time, zone, date code from corelib/tools/ 2019-06-06 15:54:32 +02:00
qtimezone Separate out the time, zone, date code from corelib/tools/ 2019-06-06 15:54:32 +02:00
time.pro Add support for calendars beside Gregorian 2019-08-20 13:41:21 +02:00