Skip to content

Restore support for reading /etc/timezone for system zone name

Downstream report: https://bugs.gentoo.org/737914 QTBUG: https://bugreports.qt.io/browse/QTBUG-87326

This restores one of the two mechanisms removed in
commit b0383cbd388336f698ceeac11a4f50cdff931dd9,
transformed to fit in with the new cached system-zone determination.

Fixes: QTBUG-87326
Pick-to: 6.1 6.0 5.15
Change-Id: Ic270acb0d958e17dbc74a0ff93a5a1843c939678
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 824d963700a91294ba4a543ebb486aedbd650284)

Added another patch since it seems to fit:

QTzTimeZonePrivate::init(): fix handling of empty ID

We were using the first abbreviation in the list, where the current
time's one is probably more apt.

We look up displayName() using ICU, when in use, but that abbreviatio
may be unknown to it. So ensure, when using abbreviation in place of
empty id, that we get the system zone for ICU, for use if we're asked
for the display name.

This is a follow up to b12d6c6a8ab5f7b01bdd2cb862a66a409700faa1.

Pick-to: 6.0 5.15
Change-Id: I177db55de1ffbc763def8a0423642f2b3da74fa6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 3c9013b76a6f4214f469613baf7ae5225b649660)
Edited by Andreas Sturmlechner

Merge request reports