qt5base-lts/src
Edward Welbourne 35412acd88 Use time-zone transition data before 1970 as well as after
QDateTime has long followed a convention of ignoring what it knows
about time-zone transitions before the epoch. This produces unhelpful
artefacts (such as an ahistorical spring-forward skipping the first
hour of 1970 in Europe/London, which was in permanent DST at the time)
and complicates the code. It documented that DST transitions were
ignored, but in fact ignored all transitions prior to 1970 and simply
assumed that the current time-zone properties (half a century later)
applied to all times before 1970.

This appears to be based on the fact that the MS APIs using time_t all
limit their range to after 1970. Given that we have to resort to
"other means" to deal with times after the end of time_t, when it's
only 32-bit (and after year 3000, on MS systems), we have the means in
place to handle times outside the range supported by the system APIs,
so have no need to mimic this restriction. (Those means are not as
robust as we might want, but they are less bad than assuming that the
present zone properites were always in effect prior to 1970.) On
macOS, the time_t functions only reach back to the start of 1900; it
reaches to the end of its time_t range and Linux covers the whole
range. Given this variety, the range is now auto-detected the first
time it is needed (based on some quick and dirty heuristics).

Various CET-specific tests now need adjustments in tests of times
before the introduction of time-zones (when they are in fact on LMT,
not CET). The systemZone() test of QTimeZone can now restore its
pre-zone test cases. Various comments on tests needed updates.

[ChangeLog][QtCore][QDateTime] Available time-zone information is now
used to its full extent, where previously QDateTime used LocalTime's
current standard time for all dates before 1970. Where we have
time-zone information, it is considered reliable, so we use it.  This
changes the "best efforts" used for times outside the range supported
by the system APIs, in most cases giving less misleading results.

Fixes: QTBUG-80421
Change-Id: I7b1df7622dd9be244b0238ed9c08845fb5b32215
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-05-26 18:00:01 +02:00
..
3rdparty Attributions: Don't mention QT_CRYPTOGRAPHICHASH_ONLY_SHA1 2021-05-23 11:47:42 +00:00
android Android: Fix select handles misplacement on QDialog 2021-05-25 08:45:39 +03:00
concurrent QtConcurrentIterateKernel: fix warning 2021-04-12 10:31:54 +00:00
corelib Use time-zone transition data before 1970 as well as after 2021-05-26 18:00:01 +02:00
dbus qdbus: add support for "aay" (QByteArrayList) 2021-05-02 22:00:43 +02:00
entrypoint Fix qmake user projects for QT_LIBINFIX builds on Windows/iOS 2021-03-17 09:04:56 +01:00
gui Doc: Use \deprecated instead of \obsolete 2021-05-26 13:06:56 +02:00
network Doc: Use \deprecated instead of \obsolete 2021-05-26 13:06:56 +02:00
opengl Disable spurious MSVC warning C4273 in Qt Gui, Qt OpenGL 2021-05-03 13:04:47 +00:00
openglwidgets Document QOpenGLWidget limitations without an alpha channel 2021-01-15 15:21:28 +01:00
platformsupport evdevtouch: Fix wrong addTouchPoint for "mtdev" 2021-02-23 14:22:20 +00:00
plugins Qt xcb: remove false detects of Qt::GroupSwitchModifier 2021-05-26 11:02:08 +00:00
printsupport Make sure _q_printerChanged is called even if only pdf printer is available 2021-05-21 11:03:18 +02:00
sql Doc: Use \deprecated instead of \obsolete 2021-05-26 13:06:56 +02:00
testlib QTestlib: Add formatting for QObject * in QCOMPARE 2021-05-26 11:02:48 +00:00
tools uic: Add further widgets to class lib map 2021-05-25 22:01:56 +02:00
widgets Doc: Use \deprecated instead of \obsolete 2021-05-26 13:06:56 +02:00
xml Doc: Use \deprecated instead of \obsolete 2021-05-26 13:06:56 +02:00
CMakeLists.txt Make it possible to disable the PrintSupport module 2021-02-09 09:17:21 +01:00