diff options
Diffstat (limited to 'tests/auto/qml/qqmllocale/tst_qqmllocale.cpp')
-rw-r--r-- | tests/auto/qml/qqmllocale/tst_qqmllocale.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp index 44d11cdda3..7a6cb7c929 100644 --- a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp +++ b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp @@ -1267,7 +1267,10 @@ QString DateFormatter::getLocalizedForm(const QString &isoTimestamp) // which will require linking to a different library to access that API. static void setTimeZone(const QByteArray &tz) { - qputenv("TZ", tz); + if (tz.isEmpty()) + qunsetenv("TZ"); + else + qputenv("TZ", tz); ::tzset(); // following left for future reference, see comment above |