Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
4.8.0
-
None
Description
The current code of QDateTime::addDays loses the UTC offset of a QDateTime, this can be easily checked by doing (in a non UTC timezone):
const QDateTime original = QDateTime::currentDateTime(); const QDateTime other = original.addDays(0); qDebug() << original.toString(Qt::ISODate) << other.toString(Qt::ISODate);
This is probably because the current code for addDays is
return QDateTime(d->date.addDays(ndays), d->time, timeSpec()); // Where did d->utcOffset go??