diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2019-03-21 15:06:18 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-06-23 14:01:12 +0200 |
commit | a04411119ead3d4473e4f0ac4bceedc585977b2f (patch) | |
tree | c6b58e72696a0ba109df4a5b774fbd1eadb64e8d | |
parent | 29c99bddbf48f97b054a34354f55b36a3f84a62c (diff) |
Save DST status when computed for a mutable QDateTimeData
Most calls to localMSecsToEpochMSecs() happen from functions that
can't save the DST status it repots (due to the data being const); but
refreshDateTime() can and (given its name) clearly should.
Pick-to: 5.15
Change-Id: Ib53c88d2233925da275f0ac52f768cada92c5d2d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/corelib/time/qdatetime.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/time/qdatetime.cpp b/src/corelib/time/qdatetime.cpp index e38f8e70b9..d85b76147b 100644 --- a/src/corelib/time/qdatetime.cpp +++ b/src/corelib/time/qdatetime.cpp @@ -2826,6 +2826,7 @@ static void refreshDateTime(QDateTimeData &d) if (spec == Qt::LocalTime) { auto dstStatus = extractDaylightStatus(status); epochMSecs = localMSecsToEpochMSecs(msecs, &dstStatus, &testDate, &testTime); + status = mergeDaylightStatus(status, dstStatus); } if (timeToMSecs(testDate, testTime) == msecs) { status |= QDateTimePrivate::ValidDateTime; |