diff --git a/src/corelib/time/qtimezone.cpp b/src/corelib/time/qtimezone.cpp index e4d17596d8e..5f5d104baf1 100644 --- a/src/corelib/time/qtimezone.cpp +++ b/src/corelib/time/qtimezone.cpp @@ -456,8 +456,15 @@ QTimeZone::QTimeZone(const QByteArray &ianaId) if (!d->isValid()) { if (ianaId.isEmpty()) d = newBackendTimeZone(); +#ifdef Q_OS_ANDROID + // on Android the isTimeZoneIdAvailable() implementation is vastly more + // expensive than just trying to create a timezone + else + d = newBackendTimeZone(ianaId); +#else else if (global_tz->backend->isTimeZoneIdAvailable(ianaId)) d = newBackendTimeZone(ianaId); +#endif // else: No such ID, avoid creating a TZ cache entry for it. } // Can also handle UTC with arbitrary (valid) offset, but only do so as