summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2018-08-17 13:10:02 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2018-08-20 09:26:33 +0000
commit98b030fc952b55b743b699e4b1e185422c0a800d (patch)
tree7ee8db43dfc1abb1562b8a02e8c004e186f3c008 /src/corelib/tools
parente4cee4bd572a95eff8d908fb0a1b8cd810f0934e (diff)
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qtimezoneprivate.cpp2
1 files changed, 1 insertions, 1 deletions
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;