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

QTimeZone::isTimeZoneIdAvailable is giving wrong result.

    XMLWordPrintable

Details

    • macOS, Windows
    • 3
    • 4389b0c42 (dev), 575b9117f (6.6), 244749749 (tqtc/lts-6.5), df73672f9 (dev)
    • Foundations Sprint 94

    Description

      Run the following test application:

      #include <QDateTime>
      #include <QTimeZone>
      #include <QDebug>
      
      int main()
      {
          QTimeZone tzFromId("UTC+01");
      
          qDebug() << "This is true:" << tzFromId.isValid();
          qDebug() << "This is UTC+01:" << QTimeZone(60*60).id();
          qDebug() << "So this should be true, but is false:"
                   << QTimeZone::isTimeZoneIdAvailable(tzFromId.id());
      
          return 0;
      }
      

      On macOS with Qt 6 and Qt 5.x, tz.isTimeZoneIdAvailable(tzFromId.id()) returns false.
      On Windows, with Qt 6 it also returns false, but Qt 5.15 return true.

      Attachments

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

        Activity

          People

            Eddy Edward Welbourne
            madwinter Marcus Tillmanns
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes