diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2018-01-18 13:48:26 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2018-02-07 12:21:00 +0000 |
commit | 6d3e5ac6d2f34a0da609f863bed95d3be571c589 (patch) | |
tree | f372cab569443cf05514cc4a6092cb0b6400e958 /src/corelib/tools/qtimezoneprivate_win.cpp | |
parent | aec6fae60b4e229b7e00e534c47d341caf49cddc (diff) |
Prefer ICU over system info on MS-Win
The ICU data is more complete; and its APIs allow it to tell the whole
story, which MS-Win's APIs can't (e.g. Morocco's otherwise-normal DST
has a hole in it for Ramadan; when this makes four transitions in a
year, the MS-APIs can't report more than two, so ignore the Ramadan
gap); and their design obliges us to use heuristics to kludge round
mis-description of simple changes to standard time in non-DST zones,
which can't be distinguished from certain (more) obscure cases of
changes to DST coinciding with a change to standard offset (causing a
DST transition to hide, leaving its other end *looking like* a non-DST
change to standard offset). Using ICU, when available, reduces how
many end users shall be mislead by such kludges.
[ChangeLog][Windows][QTimeZone] Changed MS-Win to use ICU for
time-zone data, when available, in preference to MS's TZ APIs. The
choice is made when building Qt. This will give reliable results when
non-DST transitions arise, or when a zone's DST is not simple
(e.g. interrupted by Ramadan).
Task-number: QTBUG-42021
Change-Id: I9cdd65713ecdaf8cce52dd924fbc7371630977c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qtimezoneprivate_win.cpp')
-rw-r--r-- | src/corelib/tools/qtimezoneprivate_win.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/tools/qtimezoneprivate_win.cpp b/src/corelib/tools/qtimezoneprivate_win.cpp index 8bde07c710..ec91b7e8a8 100644 --- a/src/corelib/tools/qtimezoneprivate_win.cpp +++ b/src/corelib/tools/qtimezoneprivate_win.cpp @@ -49,6 +49,7 @@ QT_BEGIN_NAMESPACE #ifndef Q_OS_WINRT +// The registry-based timezone backend is not available on WinRT, which falls back to equivalent APIs. #define QT_USE_REGISTRY_TIMEZONE 1 #endif |