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

QDateTime::fromString() conversion is not working correctly in Qt6.5

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • 6.0
    • 6.5.1, 6.5.2
    • Core: Date/Time
    • None
    • ・Qt: 6.5.2, 6.5.1
      ・MacOS: 13.2.1
    • macOS

    Description

      Step to reproduce

      1.  Run the following C++ source code in Qt6.

       

      QDateTime datetime= QDateTime::fromString("2023-09-05T04:37:00:000Z", Qt::ISODateWithMs);
      qDebug() << datetime;

       

      2.  Check debug output

      • The debug output is "QDateTime(Invalid)", in Qt6.
      • The correct debug output should be "QDateTime(2023-09-05 04:37:00.000 UTC Qt::UTC)".
      • In Qt5.15.14, this was converted correctly. The debug output is "QDateTime(2023-09-05 04:37:00.000 UTC Qt::UTC)".

      Request

      I want it fixed in Qt6.

      Attachments

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

        Activity

          People

            Eddy Edward Welbourne
            dfree Atsushi Nakanishi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes