Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.4
-
None
-
-
21
-
dff02466a0 (qt/qtdeclarative/dev) 3033e99fa8 (qt/qtdeclarative/6.4) 3033e99fa8 (qt/tqtc-qtdeclarative/6.4)
-
Team A Foundation Sprint 59
Description
Originally reported as a re-opening of QTBUG-78996 by peppe. Moved here because it is a separate bug.
My computer local timezone is set to CEST.
This snippet:
let i = 0; console.log("Row", ++i, new Date(Date.UTC(2021, 6))) console.log("Row", ++i, new Date(Date.UTC(2021, 7, 0))) console.log("Row", ++i, new Date(Date.UTC(2021, 6)).getDate()) console.log("Row", ++i, new Date(Date.UTC(2021, 7, 0)).getDate()) console.log("Row", ++i, new Date(2021, 6)) console.log("Row", ++i, new Date(2021, 7, 0)) console.log("Row", ++i, new Date(2021, 6).getDate()) console.log("Row", ++i, new Date(2021, 7, 0).getDate())
On MSVC prints:
qml: Row 1 Thu Jul 1 02:00:00 2021 GMT+0200 qml: Row 2 Sat Jul 31 02:00:00 2021 GMT+0200 qml: Row 3 1 qml: Row 4 31 qml: Row 5 Thu Jul 1 00:00:00 2021 GMT+0200 qml: Row 6 Sat Jul 31 00:00:00 2021 GMT+0200 qml: Row 7 1 qml: Row 8 31
And on MinGW prints:
qml: Row 1 Thu Jul 1 02:00:00 2021 GMT+0100 qml: Row 2 Sat Jul 31 02:00:00 2021 GMT+0100 qml: Row 3 1 qml: Row 4 31 qml: Row 5 Thu Jul 1 00:00:00 2021 GMT+0100 qml: Row 6 Sat Jul 31 00:00:00 2021 GMT+0100 qml: Row 7 30 qml: Row 8 30
If I dump QDateTime::currentDateTime, on both compilers I get
QDateTime(2021-07-14 20:53:49.858 Romance Daylight Time Qt::LocalTime)
So, 1) why is the timezone off by 1 hour when using MinGW?
And 2) why does it think that July has 30 days?
Attachments
Issue Links
- duplicates
-
QTBUG-95993 QML Date operations are wrong when DST is active
- Closed
- relates to
-
QTBUG-100014 tst_qqmlqt fails on Android
- Closed
- split from
-
QTBUG-78996 JavaScript getDay() regression on MinGW
- Closed