diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2018-08-09 11:34:27 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2018-08-14 15:02:08 +0000 |
commit | 8dd40e9b0931d2698ff2ee3a655aab8b4947dae8 (patch) | |
tree | 4bd3fba5934ebcf808202abbffe05916cbaba752 | |
parent | f2862b4d5def2c07b8b018532ab74a12b129db2c (diff) |
[macOS] Fix lower bound when searching for previous transitions
The lower bound shouldn't be the smallest (positive) value representable
by a double, but the *lowest* (finite) value.
Task-number: QTBUG-69862
Change-Id: Ia66610e3c0f8d9643c329714607f5af573206fd8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-rw-r--r-- | src/corelib/tools/qtimezoneprivate_mac.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qtimezoneprivate_mac.mm b/src/corelib/tools/qtimezoneprivate_mac.mm index fa0dd87cfc..d3c4fbe5da 100644 --- a/src/corelib/tools/qtimezoneprivate_mac.mm +++ b/src/corelib/tools/qtimezoneprivate_mac.mm @@ -227,7 +227,7 @@ QTimeZonePrivate::Data QMacTimeZonePrivate::nextTransition(qint64 afterMSecsSinc QTimeZonePrivate::Data QMacTimeZonePrivate::previousTransition(qint64 beforeMSecsSinceEpoch) const { // The native API only lets us search forward, so we need to find an early-enough start: - const NSTimeInterval lowerBound = std::numeric_limits<NSTimeInterval>::min(); + const NSTimeInterval lowerBound = std::numeric_limits<NSTimeInterval>::lowest(); const qint64 endSecs = beforeMSecsSinceEpoch / 1000; const int year = 366 * 24 * 3600; // a (long) year, in seconds NSTimeInterval prevSecs = endSecs; // sentinel for later check |