Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
None
-
5.9.1
Description
If you use for instance UTC QDateTime and pass it to QDateTimeAxis::setRange, the time will changed internally to LocalTime, which will add an extra offset to time. For instance create a QDateTime like this
QDateTime minDt; QDateTime maxDt; minDt.setOffsetFromUtc(0); maxDt.setOffsetFromUtc(0); minDt.setMSecsSinceEpoch(0); maxDt.setMSecsSinceEpoch(8000);
Where the value are like this
minDt = QDateTime(1970-01-01 00:00:00.000 UTC Qt::TimeSpec(UTC)) , since epoc 0 maxDt = QDateTime(1970-01-01 00:00:08.000 UTC Qt::TimeSpec(UTC)) , since epoc 8000
When these are passed to QDateTimeAxis::setRange, the maxDt will end up to this
QDateTime(1970-01-01 02:00:08.000 FLE Standard Time Qt::TimeSpec(LocalTime))
Which has extra 2 hours in my case. See also the image.
Attachments
Issue Links
- relates to
-
QTBUG-94188 QDateTimeEdit cannot support general time-zones
-
- Reported
-