From 5cfe7d2074306a72909ea20718c1c4bebeb27bad Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 5 Jan 2015 14:44:36 +0100 Subject: Parse dates as Qt::RFC2822Date too [ChangeLog][QtQml] Fix JavaScript Date parsing to correctly accept RC2822 dates. Task-number: QTBUG-38011 Change-Id: Ic7d3f5b8c624d6780d4c3595fd2efe22c427ffd3 Reviewed-by: Lars Knoll --- tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp') diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 019d6790e1..38a2affe3a 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -7361,7 +7361,8 @@ void tst_qqmlecmascript::dateParse() QMetaObject::invokeMethod(object, "test_is_invalid_qtDateTime", Q_RETURN_ARG(QVariant, q)); QVERIFY(q.toBool() == true); - + QMetaObject::invokeMethod(object, "test_rfc2822_date", Q_RETURN_ARG(QVariant, q)); + QCOMPARE(q.toLongLong(), 1379512851000LL); } void tst_qqmlecmascript::utcDate() -- cgit v1.2.3