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

QDate::fromString() still asumes we're in the 20th century

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 6.0.0 Beta2
    • Core: Date/Time
    • None
    • All

    Description

      QDate::fromString("05.12.20", QLocale::system().dateFormat(QLocale::ShortFormat));
      

      returns 05.12.1920 even we're in the 21st century for some years now. Although this can't be changed for Qt5 I would assume it's fine for Qt6. The affecting code is in qdatetimeparser.cpp / QDateTimeParser::fromString():

      QDateTime val(QDate(1900, 1, 1).startOfDay());
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-89147
          # Subject Branch Project Status CR V

          Activity

            People

              Eddy Edward Welbourne
              chehrlic Christian Ehrlicher
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There is 1 open Gerrit change