Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.12.0, 5.12.1, 5.12.2, 5.13.0
-
None
-
03fadc26e7617aece89949bc7d0acf50f6f050a9 (qt/qtbase/5.12)
Description
Constant zones like UTC can have empty transition lists, but QTzTimeZonePrivate::data returns invalidData() for the data at any time, in such a zone, so we get bogus values for offsets from UTC and, surely, other parameters.
This breaks various things, notably various tests fail on hosts with UTC as their system time-zone, if the system time-zone is specified minimally. Despite the lack of any transitions, there is still a POSIX rule included in affected zones, which would provide all the information we need.
(In commit 1acafb12070ce4ae70a8030f00cc65d1c157350a I optimised the performance of QTzTimeZonePrivate::data() and mistakenly commented, based on the prior implementation, that an empty list of transitions meant an invalid zone. However, this problem was present in the prior implementation that prompted me to write that.)