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

QDateTime::fromString(, Qt::IsoDate) accepts certain invalid input

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 4.8.5
    • Core: Date/Time
    • None
    • Linux
    • I0e481144136c60d4cac61364b9b2c1d2cd1e78fc

    Description

      The input where we first noticed it was something like:

      QString input = "431600101".

      This string is accepted and returned as QDateTime("Sat Jan 1 00:00:00 4316"). The character between the "year" (i.e. input[4] is ignored, as well as e.g. input[7]). To be a valid ISO date string those both have to be '-', and the whole string has to be one character longer.

      It looks like none of the 3 format strings shown in the documentation of Qt::IsoDate is used as any of them would reject the input string.

      Attachments

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

        Activity

          People

            johnlayt John Layt
            rebemlix Rolf Eike Beer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes