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 <thiago.macieira@intel.com>
This commit is contained in:
parent
679bb388f0
commit
c801e837a6
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user