diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-08-28 15:32:09 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-09-28 15:55:47 +0000 |
commit | 87b07a60da183a60a7e7c79e5daa3ab69a03b4c3 (patch) | |
tree | ebff3c9cde2ed1cfcec5488afabbec13772670a9 /util | |
parent | 4d3939650dda199807f4707574ed39d871e340d8 (diff) |
Don't guess UTC when we can't find a system zone name
If we're able to load a system zone without knowing its name, we
shouldn't claim that its name is UTC. Instead, use the system zone
information's name for the zone.
Let the backend return an empty string if it can't determine the
system zone ID, provided it has some way to get system zone info
despite not knowing its name. This can happen on Windows if the system
zone is one of Microsoft's idiosyncratic names that we don't
recognize; or on Linux if /etc/timezone is a copy of a zoneinfo file,
instead of a symlink. In support of that, handle empty ID as a request
for system zone info, so that the backend constructors taking an IANA
ID never get passed an empty ID; that gets routed to the default
constructor instead.
This incidentally restores QTzTimeZonePrivate's behavior, for empty
ID, of reading the content of /etc/timezone if we are unable to
determine the name of its zone any other way.
Fixes: QTBUG-86306
Change-Id: Iad57c18199124f651ebc3d32c3deffca6eaab512
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit b12d6c6a8ab5f7b01bdd2cb862a66a409700faa1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'util')
0 files changed, 0 insertions, 0 deletions