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

QT DST beyond 2037

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 6.2.0 Alpha
    • 5.9
    • Core: Date/Time
    • None
    • All
    • b4a875544ba8f2d11e183d67f45891d6149203ed (qt/qtbase/dev)

    Description

      QDateTime handles DST beyond 2037 incorrectly. It seems it is set to 29.3 for winter/summer change for all dates beyond 2037 at least for Time zone in Bratislava (GMT+1). Same situation is for summer/winter change. Simple example shows the problem. Date 29.3.2039 at 02:01 is a valid date and QT says the opposite. Date 27.03.2039 at 02:01 should be marked as invalid.

       

      #include <QCoreApplication>
      #include <QDateTime>
      #include <QDebug>
      int main(int argc, char *argv[])
      { 
        QCoreApplication a(argc, argv);  
        QDateTime local(QDate(2039, 3, 29), QTime(2, 0, 1));
        if (!local.isValid()) { qDebug() << "Invalid date"; }
        QDateTime local1(QDate(2039, 3, 29), QTime(1, 59, 59));
        if (!local1.isValid()) { qDebug() << "Invalid date1"; } 
        return a.exec();
      }

      Attachments

        Issue Links

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

          Activity

            People

              Eddy Edward Welbourne
              jano_sb Jan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes