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

QTimeZone::hasTransisions() may be misleading

    XMLWordPrintable

Details

    • Suggestion
    • Status: Reported
    • P3: Somewhat important
    • Resolution: Unresolved
    • 5.15, 6.2
    • None
    • Core: Date/Time
    • None
    • All

    Description

      It's documented to report whether the system zone backend supports looking up transitions.
      However, QTimeZone's instantiation can use a QUtcTimeZonePrivate backend, whose hasTransitions(), inherited from QTimeZonePrivate, returns false.
      So the actual implementation of QTimeZone::hasTransitions() reports on whether the instance it's called on uses a backend that supports transitions.
      That's a documentation issue.

      Meanwhile, for anyone who hasn't read the documentation, the name hasTransitions() might reasonably lead folk to suppose it's a test of whether the zone itself has any transitions, as well as its backend supporting them. We could perhaps add a zoneHasTransitions() method to fill that niche.

      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
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes