- 
    
Bug
 - 
    Resolution: Done
 - 
    
P2: Important
 - 
    5.11.1
 - 
    None
 
- 
        
 - 
        d43ac840e5d5a0a2df9e8adce276c956c98be6aa (qt/qtbase/5.12)
 
Whenever the minimum time is set the time specification is assumed to coincide with the one set in the control (i.e. ignored), which is what is described for QDateTimeEdit::setDateTime. On the contrary when setting the max time, local time is assumed in all cases.
The relevant code is as follows for setMinimumTime:
void QDateTimeEdit::setMinimumTime(const QTime &min) { Q_D(QDateTimeEdit); if (min.isValid()) { const QDateTime m(d->minimum.toDate(), min, d->spec); setMinimumDateTime(m); } }
while for setMaximumTime:
void QDateTimeEdit::setMaximumTime(const QTime &max) { Q_D(QDateTimeEdit); if (max.isValid()) { const QDateTime m(d->maximum.toDate(), max); setMaximumDateTime(m); } }
Incidentally this makes QDateTimeEdit and QTimeEdit pretty finicky and quite frankly next to unusable in most real-world scenarios.
- relates to
 - 
                    
QTBUG-72440 QDateTimeEdit and QTimeEdit range-ends can only cope with LocalTime and UTC
-         
 - Reported
 
 -         
 
| For Gerrit Dashboard: QTBUG-71311 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 247397,3 | Specify the date-time spec when setting max time | 5.12 | qt/qtbase | Status: MERGED | +2 | 0 |