qt5base-lts/tests/auto/corelib/tools/qdatetime
Edward Welbourne 81858bf172 Don't pretend we know what DST to use for an offset date.
When QDateTime::addDate() and friends sanitize their end-state, they
were using the DST status of their start-state (if known) to control
it.  This lead to misguided results and, in particular, inconsistent
results given that a raw-constructed QDateTime comes into being
ignorant of its DST, while a .toLocalTime() one knows its DST.

Furthermore, the code to do this was triplicated, tricky and poorly
explained.  So pull it out into a local static function and explain
what it's doing, and why, more clearly and only once.

Task-number: QTBUG-49008
Change-Id: Ia4bb3c5e9267fff8bb963ea705267998218ed623
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-01-12 09:23:55 +00:00
..
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
qdatetime.pro Add Objective-C specific type converters to QDateTime 2014-10-07 18:54:21 +02:00
tst_qdatetime_mac.mm Add shared implementation of a NSAutoreleasePool wrapper to qglobal 2015-05-27 18:45:29 +00:00
tst_qdatetime.cpp Don't pretend we know what DST to use for an offset date. 2016-01-12 09:23:55 +00:00