diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2021-02-17 11:28:51 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-02-18 15:44:57 +0000 |
commit | 7e3c6465770ab346764bf51ab2edd745390eb7d6 (patch) | |
tree | 52667e720422586934982b5c217ba9122c5af8a8 /tests/auto/corelib/serialization/json/tst_qtjson.cpp | |
parent | 8ae64f3d08bcf124b54f4a4369cf916c14c5d4e2 (diff) |
Correct qt_mktime()'s check for last second in 1969
It was comparing time->second() to MSECS_PER_DAY - 1, but
time->second() is the second within its minute, so is at most 59.
It should be comparing seconds into the day to SECS_PER_DAY - 1.
Prompted by a PVS-studio article.
Change-Id: I1802c49fa18818f4b4fe74f187da5f799df7d1de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 94b9ee03b5646bf58c12337bbc44e38265ad15a2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/corelib/serialization/json/tst_qtjson.cpp')
0 files changed, 0 insertions, 0 deletions