diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2019-09-05 17:18:56 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2019-09-19 11:29:46 +0200 |
commit | 3a71e387d9759d87241c0c69b2c54f67ca547e10 (patch) | |
tree | e181c54ff5477c04420dc5356eb420a92dc27388 /dist | |
parent | 4ddc50c0cd16ddd146ea9ea21d6565c8f4a5e2bc (diff) |
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>
(cherry picked from commit 8286daba038d3c90d2bc06785ffcf9c0c603cb83)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'dist')
0 files changed, 0 insertions, 0 deletions