Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.9
-
None
-
-
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
- relates to
-
QTBUG-79923 Equip QDateTime to distinguish the two passes through an "overlap" hour during a time-zone fall-back, such as the end of DST
- Closed
-
QTBUG-80421 Use DST data even before 1970
- Closed
For Gerrit Dashboard: QTBUG-73225 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
336241,15 | Extend time_t-based handling all the way to the end of time_t | dev | qt/qtbase | Status: MERGED | +2 | 0 |