aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2020-10-29 11:21:48 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2020-10-29 13:11:03 +0100
commit43eaa77e8ed03153335c0002dcc8b660c39a0beb (patch)
tree10bdc01a0c74323bf5ac497465d891b6da55d8e1 /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
parentd37448168930b3332890c6008367cafa74253c52 (diff)
QML: Make date parsing more lenient
This fixes a regression from Qt 5 to Qt 6, because QDateTime is now apparently more strict in its parsing of RFC2822Date. The string in the test-case is not valid according to that spec, but JS engines like V8 still accept it, and so did we in Qt 5. Fixes: QTBUG-87610 Change-Id: I2c6eb2087e4845b04fa0dc4f7aa9a229b3428a43 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index e3396a430f..3ab7b45b2a 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -677,6 +677,9 @@ void tst_qqmlecmascript::checkDateTime_data()
QTest::newRow("October")
<< testFileUrl("checkDateTime-October.qml")
<< QDateTime(QDate(2019, 10, 3), QTime(12, 0), Qt::LocalTime);
+ QTest::newRow("nonstandard-format")
+ << testFileUrl("checkDateTime-nonstandardFormat.qml")
+ << QDateTime::fromString("1991-08-25 20:57:08 GMT+0000", "yyyy-MM-dd hh:mm:ss t");
}
void tst_qqmlecmascript::checkDateTime()