-
Bug
-
Resolution: Done
-
P4: Low
-
5.6.0 Alpha
-
Ubuntu 13.04
-
81858bf1722081d99fdea72f55e67c04c5bb3d92
When on Europe/Helsinki timezone, these two seemingly similar programs give different results:
const QDateTime fromUTC = QDateTime(QDate(2015, 3, 28), QTime(4, 0, 0), Qt::UTC).toLocalTime();
qDebug() << fromUTC.addDays(1).toString();
// "Sun Mar 29 07:00:00 2015"
const QDateTime localtime = QDateTime(QDate(2015, 3, 28), QTime(6, 0, 0), Qt::LocalTime);
qDebug() << localtime.addDays(1).toString();
// "Sun Mar 29 06:00:00 2015"
This was introduced by commit: 3b36a550b04fbdfca835002c9c090be8099afa7f
| For Gerrit Dashboard: QTBUG-49008 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 139922,7 | Make DST-transition test more general. | 5.6 | qt/qtbase | Status: MERGED | +2 | 0 |
| 139924,8 | Add spring-forward test | 5.6 | qt/qtbase | Status: MERGED | +2 | 0 |
| 140422,4 | Test .addDays() and .addMonths() are sensible around DST changes. | 5.6 | qt/qtbase | Status: MERGED | +2 | 0 |
| 140423,4 | Add DST-change test for a date derived via .toLocalTime(). | 5.6 | qt/qtbase | Status: MERGED | +2 | 0 |
| 140427,6 | Don't pretend we know what DST to use for an offset date. | 5.6 | qt/qtbase | Status: MERGED | +2 | 0 |