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>
This commit is contained in:
Edward Welbourne 2019-03-21 15:06:18 +01:00
parent 29c99bddbf
commit a04411119e

View File

@ -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;