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

QLocale::toDateTime fails to parse February 29th

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 4.8.0
    • Core: Date/Time
    • None

    Description

      Qt 4.8.0 returns an invalid QDateTime in the following code:

         
      #include <QtCore>
      #include <iostream>
      
      int main(int argc, char* argv[]) {
              QString feb29 = "Feb 29 09:10";
              QString format = "MMM dd hh:mm";
      
              QDateTime dt = QLocale::c().toDateTime(feb29, format);
      
              std::cout << "valid = " << dt.isValid() << std::endl;
      
              return 0;
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              fmercille Frédéric Mercille
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes