summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qdatetime/tst_qdatetime.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qdatetime/tst_qdatetime.cpp b/tests/auto/qdatetime/tst_qdatetime.cpp
index 86a4c80..d23133d 100644
--- a/tests/auto/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/qdatetime/tst_qdatetime.cpp
@@ -1286,6 +1286,12 @@ void tst_QDateTime::fromString()
dt = QDateTime::fromString("2002-10-01", Qt::ISODate);
QCOMPARE(dt, QDateTime(QDate(2002, 10, 1), QTime(0, 0, 0, 0)));
+ dt = QDateTime::fromString("1987-02-13T13:24:51+01:00", Qt::ISODate);
+ QCOMPARE(dt, QDateTime(QDate(1987, 2, 13), QTime(12, 24, 51), Qt::UTC));
+
+ dt = QDateTime::fromString("1987-02-13T13:24:51-01:00", Qt::ISODate);
+ QCOMPARE(dt, QDateTime(QDate(1987, 2, 13), QTime(14, 24, 51), Qt::UTC));
+
dt = QDateTime::fromString("Thu Jan 1 00:12:34 1970 GMT");
QCOMPARE(dt.toUTC(), QDateTime(QDate(1970, 1, 1), QTime(0, 12, 34), Qt::UTC));