Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.0, 6.0.0
-
None
-
macOS 11.2 Big Sur
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin20.3.0
Thread model: posix
-
-
3
-
f9469990d0fb1ae9444d415390ec8be483ec4ab3 (qt/qtbase/dev) 02c7b658f6246220fa926abb2b69779d2ffe77f1 (qt/qtbase/6.1) 0c47482edefd35f5d7413a970d8dd088e7e3b743 (qt/qtbase/6.2) 54181e1b757a9ef42b446afb230fc2317fc23c37 (qt/tqtc-qtbase/5.15)
-
Qt6_Foundation_Sprint 35
Description
With Qt 5.15.0 or Qt 6.0.0 on macOS 11.2 Big Sur, these conversions yield invalid dates:
qDebug() << QDate::fromString("1978-04-02", "yyyy-MM-dd"); qDebug() << QDate::fromString("02-04-1978", "dd-MM-yyyy");
This behaviour occurs for at least three other dates, i.e., 1977-03-27, 1978-04-02, 1979-04-01, 1980-03-30. This can be checked with the following code (compilable example attached):
QString format("yyyy-MM-dd"); for (int year=1930; year <= 2030; ++year) { QDate date(year,1,1); while (date != QDate(year+1,1,1)) { QString str = date.toString(format); QDate converted = QDate::fromString(str, format); if (converted != date) qDebug() << date << converted; date = date.addDays(1); } }
Attachments
Issue Links
- relates to
-
QTBUG-93844 window7 64bit , QDateEdit.setDate() cannot display "1970-01-02,1970-01-03,1970-01-04"
-
- Closed
-
For Gerrit Dashboard: QTBUG-91120 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
334596,3 | WIP: attempt to reproduce round-trip bug | dev | qt/qtbase | Status: ABANDONED | -2 | 0 |
352245,6 | Fix date parsing when local time lacks the start of the day | dev | qt/qtbase | Status: MERGED | +2 | 0 |
353918,2 | Fix date parsing when local time lacks the start of the day | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
353919,2 | Fix date parsing when local time lacks the start of the day | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
353921,2 | Fix date parsing when local time lacks the start of the day | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |