qt5base-lts/tests/auto
Edward Welbourne 4b4bd6ab98 Simplify fileTimeToQDateTime() by having it return a UTC time
This avoids so many complications.  The prior code, using
SystemTimeToTzSpecificLocalTime(), lead to unhelpful results when the
QDateTime() implementation used MS-POSIX's defective mktime().
Although SystemTimeToTzSpecificLocalTime() is actually more correct,
we were getting inconsistent results by mixing the two: and
eliminating the use of mktime() turns out to be decidedly tricky.  So,
to avoid inconsistency, stick with a UTC time (which is what FILETIME
is defined as).  Change QFileInfo's methods to explicitly convert
.toLocalTime() where appropriate and document that these methods do
indeed return local time (as we conjecture has been taken for granted
by callers).

Also added a regression test for the reported case of this going
wrong.  A time-stamp from before Russia's (permanent, not DST) change
of TZ could end up inconsistently handled between file-system
meta-data and raw date-time APIs, due to cross-talk between different
MS-Win time APIs.

[ChangeLog][QtCore][QFileInfo] Made sure that all file lifecycle times
are in local time. This was probably true before, but is now explicit.

Task-number: QTBUG-48306
Change-Id: Ic0b99d25c4168f623d31967bc60665c0c4f38a14
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-11 11:53:27 +00:00
..
android
bic/data BIC data files for QtBase for Qt 5.7 2016-10-03 09:38:59 +00:00
cmake CMake: Create a Qt5::<ModuleName>Private target for each module 2016-12-23 19:24:35 +00:00
compilerwarnings/data
concurrent Merge remote-tracking branch 'origin/5.6' into 5.7 2016-08-25 16:12:11 +02:00
corelib Simplify fileTimeToQDateTime() by having it return a UTC time 2017-01-11 11:53:27 +00:00
dbus Use qtConfig throughout in qtbase 2016-08-19 04:28:05 +00:00
gui tst_QImageWriter: clean up 2017-01-06 13:31:26 +00:00
guiapplauncher
installed_cmake
network HTTP/2 - fix handling of GOAWAY frame 2017-01-11 10:39:43 +00:00
opengl Remove last traces of opengl es 1 support 2016-11-16 22:00:46 +00:00
other Merge remote-tracking branch 'origin/5.8' into dev 2016-12-13 09:39:20 +01:00
printsupport
shared Make self-contained test of condensed font matching and width 2016-10-16 00:11:13 +00:00
sql tst_qsqlquery.cpp: Refactor runIntegralTypesMysqlTest() 2016-12-05 12:06:39 +00:00
testlib Disable core dumps for selftests that are meant to be crashing 2016-12-08 23:50:44 +00:00
tools qmake: introduce magic bypassNesting() scope 2016-12-13 18:56:20 +00:00
widgets Widgets: report focus object change to QtGui before sending widget events 2017-01-10 23:24:57 +00:00
xml Merge remote-tracking branch 'origin/5.7' into 5.8 2016-11-01 06:02:55 +01:00
auto.pro Use qtConfig throughout in qtbase 2016-08-19 04:28:05 +00:00
network-settings.h