From 8a270dee2b8c06e734247b18533564b997923c06 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 24 Aug 2018 11:46:20 +0200 Subject: [PATCH] Revert "Fix time-zone tests on macOS >= 10.13, which now knows what CET is" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit fd38c97a6c5b7bfab39b5f814d68a02e4d197e70. Apparently our actual VMs for 10.13 don't get this right, although the ones used in testing did (prompting the fix this reverts). We probably have mis-configured VMs, but this is the quick-fix to get development moving again. Task-number: QTBUG-70149 Change-Id: Ib96755d8e21d9b226e22fc985f13f34fa04117b1 Reviewed-by: MÃ¥rten Nordheim --- .../corelib/tools/qdatetime/tst_qdatetime.cpp | 16 ++++++++-------- tests/auto/corelib/tools/qlocale/tst_qlocale.cpp | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp index c0b7674f22..d460beafde 100644 --- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp @@ -2726,15 +2726,15 @@ void tst_QDateTime::timeZoneAbbreviation() qDebug("(Skipped some CET-only tests)"); } - QString cet(QStringLiteral("CET")), cest(QStringLiteral("CEST")); #ifdef Q_OS_ANDROID // Only reports (general) zones as offsets (QTBUG-68837) - cet = QStringLiteral("GMT+01:00"); - cest = QStringLiteral("GMT+02:00"); -#elif defined Q_OS_DARWIN // Lacked real names until 10.13, High Sierra - if (QOperatingSystemVersion::current() < QOperatingSystemVersion::MacOSHighSierra) { - cet = QStringLiteral("GMT+1"); - cest = QStringLiteral("GMT+2"); - } + const QString cet(QStringLiteral("GMT+01:00")); + const QString cest(QStringLiteral("GMT+02:00")); +#elif defined Q_OS_DARWIN + const QString cet(QStringLiteral("GMT+1")); + const QString cest(QStringLiteral("GMT+2")); +#else + const QString cet(QStringLiteral("CET")); + const QString cest(QStringLiteral("CEST")); #endif QDateTime dt5(QDate(2013, 1, 1), QTime(0, 0, 0), QTimeZone("Europe/Berlin")); diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index 9e9ba03a60..130ac4ce59 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -1623,15 +1623,15 @@ void tst_QLocale::formatTimeZone() qDebug("(Skipped some CET-only tests)"); } - QString cet(QStringLiteral("CET")), cest(QStringLiteral("CEST")); #ifdef Q_OS_ANDROID // Only reports (general) zones as offsets (QTBUG-68837) - cet = QStringLiteral("GMT+01:00"); - cest = QStringLiteral("GMT+02:00"); -#elif defined Q_OS_DARWIN // Lacked real names until 10.13, High Sierra - if (QOperatingSystemVersion::current() < QOperatingSystemVersion::MacOSHighSierra) { - cet = QStringLiteral("GMT+1"); - cest = QStringLiteral("GMT+2"); - } + const QString cet(QStringLiteral("GMT+01:00")); + const QString cest(QStringLiteral("GMT+02:00")); +#elif defined Q_OS_DARWIN + const QString cet(QStringLiteral("GMT+1")); + const QString cest(QStringLiteral("GMT+2")); +#else + const QString cet(QStringLiteral("CET")); + const QString cest(QStringLiteral("CEST")); #endif QDateTime dt6(QDate(2013, 1, 1), QTime(0, 0, 0), QTimeZone("Europe/Berlin"));