summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/datetime
diff options
context:
space:
mode:
authorRainer Keller <rainer.keller@theqtcompany.com>2015-01-15 09:45:07 +0100
committerRainer Keller <rainer.keller@theqtcompany.com>2015-01-19 10:21:26 +0100
commit20480070a60469017770257b6c574c5707cda58b (patch)
tree17486649663c004d7355e5b448d00c7042acac77 /tests/auto/testlib/selftests/datetime
parentec9bc843d8a5c18459f3669c6e22acac2077df67 (diff)
Autotest: Selftests fail in UTC timezone
Selftests for testlib fail when executed in UTC timezone because local and UTC are the same, but expected to be different. A custom timezone is used instead. Debug output of qCompare does only handle local and non-local timezones, using new Qt5 features allows to show the correct timezone in format string. Change-Id: I753884a12370952b7b62a90d62896db4f2d3d1b4 Reviewed-by: Jason McDonald <macadder1@gmail.com>
Diffstat (limited to 'tests/auto/testlib/selftests/datetime')
-rw-r--r--tests/auto/testlib/selftests/datetime/tst_datetime.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/testlib/selftests/datetime/tst_datetime.cpp b/tests/auto/testlib/selftests/datetime/tst_datetime.cpp
index d684f46f16..95bc72298e 100644
--- a/tests/auto/testlib/selftests/datetime/tst_datetime.cpp
+++ b/tests/auto/testlib/selftests/datetime/tst_datetime.cpp
@@ -52,7 +52,7 @@ private slots:
void tst_DateTime::dateTime() const
{
const QDateTime utc(QDate(2000, 5, 3), QTime(4, 3, 4), Qt::UTC);
- const QDateTime local(QDate(2000, 5, 3), QTime(4, 3, 4), Qt::LocalTime);
+ const QDateTime local(QDate(2000, 5, 3), QTime(4, 3, 4), Qt::OffsetFromUTC, 120 /* 2 minutes */);
QCOMPARE(local, utc);
}