qt5base-lts/src/corelib
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
..
animation Standardize some "We mean it" comments 2016-08-17 19:51:40 +00:00
arch Merge remote-tracking branch 'origin/5.7' into 5.8 2016-08-29 15:30:17 +02:00
codecs Properly use QT_CONFIG macro to check for ICU 2016-11-29 19:04:37 +00:00
doc QObject: add startTimer() overload with std::chrono 2016-12-23 18:08:53 +00:00
global Add support for building for INTEGRITY using GHS toolchain 2017-01-10 10:06:23 +00:00
io Simplify fileTimeToQDateTime() by having it return a UTC time 2017-01-11 11:53:27 +00:00
itemmodels QItemSelectionRange: de-inline op< 2016-12-02 20:22:20 +00:00
json Merge remote-tracking branch 'origin/5.7' into 5.8 2016-11-25 14:41:29 +01:00
kernel Remove compatibility code paths for macOS < 10.10 and iOS < 8.0 2017-01-09 10:11:48 +00:00
mimetypes Merge remote-tracking branch 'origin/5.8' into dev 2016-12-13 09:39:20 +01:00
plugin Merge remote-tracking branch 'origin/5.6' into 5.7 2016-11-04 11:39:15 +01:00
statemachine Merge remote-tracking branch 'origin/5.7' into 5.8 2016-11-24 10:31:21 +01:00
thread doc: clangqdoc documents the threads case 2017-01-06 20:18:19 +00:00
tools doc: Fix all remaining "Cannot tie" errors in QtBase 2017-01-06 07:04:12 +00:00
xml Merge remote-tracking branch 'origin/5.7' into 5.8 2016-11-16 12:35:36 +01:00
configure.json Restore configure command line compatibility for PCRE support 2017-01-04 12:02:31 +00:00
corelib.pro Use separate Qt5Config.cmake inside build directory 2016-11-25 10:46:34 +00:00
eval.pri
Qt5Config.cmake.in Use separate Qt5Config.cmake inside build directory 2016-11-25 10:46:34 +00:00
Qt5CoreConfigExtras.cmake.in Use qtConfig throughout in qtbase 2016-08-19 04:28:05 +00:00
Qt5CoreConfigExtrasMkspecDir.cmake.in
Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
Qt5CoreMacros.cmake Make moc obey the preprocessor environment variable for include paths 2016-07-20 02:54:09 +00:00
Qt5CTestMacros.cmake
Qt5ModuleLocation.cmake.in Use separate Qt5Config.cmake inside build directory 2016-11-25 10:46:34 +00:00
Qt5ModuleLocationForInstall.cmake.in Use separate Qt5Config.cmake inside build directory 2016-11-25 10:46:34 +00:00
QtCore.dynlist
qtzlib.pro