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

QLocale::toDatetime does not always work when it should?

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.7.1, 6.8.0 FF
    • 6.6.2
    • Core: Date/Time
    • None
    • All
    • 3e426182e (dev), 23b69855c (6.7)
    • Foundation Sprint 104, Foundation Sprint 105, Foundation Sprint 106

    Description

        const QLocale locale(QLocale::Language::C);
        QString tst = locale.toString(QDateTime(QDate(2024, 3, 20), QTime(16, 17, 0)), "ddd, dd MMM yy HH:mm:ss");
        QDateTime tst2 = locale.toDateTime(tst, "ddd, dd MMM yy HH:mm:ss");
        QString tst3 = tst2.toString("ddd, dd MMM yy HH:mm:ss");
      

      The above variable "tst2" is INVALID and "tst3" is EMPTY but it should not be. It should contain date/time and string representation of original datetime from "tst".

      Attachments

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

        Activity

          People

            Eddy Edward Welbourne
            skunkos Martin Rotter
            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 is 1 open Gerrit change