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:
parent
29c99bddbf
commit
a04411119e
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user