From 98b030fc952b55b743b699e4b1e185422c0a800d Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 17 Aug 2018 13:10:02 +0200 Subject: Scale a correction by a factor of a thousand that it was missing The difference between two transitions' offsets is measured in seconds, but we add it to a time in milliseconds; so it needs to be scaled to fit. Fortunately rarely enough applied that it hadn't caused any reported problems. Change-Id: I11f9f9e46d43d748220e072ad7504d4c8c5bf192 Reviewed-by: Thiago Macieira --- src/corelib/tools/qtimezoneprivate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qtimezoneprivate.cpp b/src/corelib/tools/qtimezoneprivate.cpp index de571d8d23..8bf7336a42 100644 --- a/src/corelib/tools/qtimezoneprivate.cpp +++ b/src/corelib/tools/qtimezoneprivate.cpp @@ -402,7 +402,7 @@ QTimeZonePrivate::Data QTimeZonePrivate::dataForLocalTime(qint64 forLocalMSecs, 0 < tran.atMSecsSinceEpoch - nextTran.atMSecsSinceEpoch = (nextTran.offsetFromUtc - tran.offsetFromUtc) * 1000 */ - int dstStep = nextTran.offsetFromUtc - tran.offsetFromUtc; + int dstStep = (nextTran.offsetFromUtc - tran.offsetFromUtc) * 1000; Q_ASSERT(dstStep > 0); // How else could we get here ? if (nextFirst) { // hint thought we needed nextTran, so use tran tran.atMSecsSinceEpoch -= dstStep; -- cgit v1.2.3