Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-74614

QTzTimeZonePrivate::data fails to provide data for no-transition zones (e.g. UTC)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.12.3, 5.14.0 Alpha
    • 5.12.0, 5.12.1, 5.12.2, 5.13.0
    • Core: Date/Time
    • 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.)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Eddy Edward Welbourne
            Eddy Edward Welbourne
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes