tst_QDateTimeEdit: Use correct zone for findSpring()'s transition
The function is passed a zone to work in, so setting the transition to local time made no sense; set to the given zone's time, instead. Pick-to: 6.5 Change-Id: Icaa0955fe5fcd5bc257322afcb7e25e932dedd1b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mate Barany <mate.barany@qt.io>
This commit is contained in:
parent
a076fdfec6
commit
f06cc22509
@ -4568,7 +4568,7 @@ static QDateTime findSpring(int year, const QTimeZone &timeZone)
|
||||
const QTimeZone::OffsetData transition =
|
||||
midSummer.isDaylightTime() ? timeZone.previousTransition(midSummer)
|
||||
: timeZone.nextTransition(midSummer);
|
||||
const QDateTime spring = transition.atUtc.toLocalTime();
|
||||
const QDateTime spring = transition.atUtc.toTimeZone(timeZone);
|
||||
// there might have been DST at some point, but not in the year we care about
|
||||
if (spring.date().year() != year || !spring.isDaylightTime())
|
||||
return QDateTime();
|
||||
|
Loading…
Reference in New Issue
Block a user