Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.0.0 Alpha
-
43eaa77e8ed03153335c0002dcc8b660c39a0beb (qt/qtdeclarative/dev)
Description
Noticed while fixing QtPIM unit tests to work with Qt6.
import QtQml 2.0 QtObject { id: root Component.onCompleted: { var testdate = new Date("1991-08-25 20:57:08 GMT+0000") console.log("Constructed JS date: " + testdate) console.log("As UTC String: " + testdate.toUTCString()) } }
When run with Qt5 qmlscene we get:
$ ../build/qt5/qtbase/bin/qmlscene testdate.qml
qml: Constructed JS date: Mon Aug 26 06:57:08 1991 GMT+1000
qml: As UTC String: Sun Aug 25 20:57:08 1991 GMT
But when run with Qt6 qmlscene we get:
$ ../build/qt6/qtbase/bin/qmlscene testdate.qml
qml: Constructed JS date: Invalid Date
qml: As UTC String: Invalid Date
Ubuntu Linux 18.04 / gcc 7.5