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

QT QLocale toDate always return invalid QDate on some locale different than us

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.2.1, 5.3.0
    • Core: Date/Time
    • None
    • Windows 7 Ultimate SP1, QT 5.3.0, spanish locale.

      Why this code return an invalid date?

      QLocale locale("es");
      QDate date = locale.toDate("1-Jun-14", "d-MMM-yy");
      

      If debug the locale variable, it is initialized correctly to locale es_ES, but doesn't return the date and date.isValid() returns false.

      Please, see http://stackoverflow.com/questions/24091781/qt-qlocale-todate-always-return-invalid-qdate-on-es-locale, where another people tests other locales with the same error.

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

            ritt.ks Konstantin Ritt
            lqsa lqsa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes