From c801e837a6d9779a4443710824cf1aa16b6d4591 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Wed, 26 Jul 2023 11:58:04 +0200 Subject: [PATCH] Remove spurious early return from QTZPrivate::stateAtZoneTime() A zone may have transitions, none of which is for daylight-savings; notably, Kiritimati has never done DST but did make a whole-day transition to move the international date line from its west to its east. (It also has, before that, the usual transition out of LMT and a rounding transition from an initial UTC-10:40 offset to UTC-10.) Change-Id: I5779e965d677cf9698b403d6a11242c9edeac864 Reviewed-by: Thiago Macieira --- src/corelib/time/qtimezoneprivate.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/corelib/time/qtimezoneprivate.cpp b/src/corelib/time/qtimezoneprivate.cpp index 637d9c8c6f..9032f2cf79 100644 --- a/src/corelib/time/qtimezoneprivate.cpp +++ b/src/corelib/time/qtimezoneprivate.cpp @@ -172,14 +172,6 @@ QTimeZonePrivate::Data QTimeZonePrivate::data(qint64 forMSecsSinceEpoch) const // Private only method for use by QDateTime to convert local msecs to epoch msecs QTimeZonePrivate::Data QTimeZonePrivate::dataForLocalTime(qint64 forLocalMSecs, int hint) const { -#ifndef Q_OS_ANDROID - // The Android back-end's hasDaylightTime() is only true for zones with - // transitions in the future; we need it to mean "has ever had a transition" - // though, so can't trust it here. - if (!hasDaylightTime()) // No DST means same offset for all local msecs - return data(forLocalMSecs - standardTimeOffset(forLocalMSecs) * 1000); -#endif - /* We need a UTC time at which to ask for the offset, in order to be able to add that offset to forLocalMSecs, to get the UTC time we need.