Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[aliases] Improve timezone alias data handling. Fixes JB#53711
"Etc/GMT+2" is a valid timezone name, it is defined in similarly named file under /usr/share/zoneinfo, and thus it should be possible to select is as the current timezone. However attempt to do so, e.g. via timedclient-qt5 --set-info=timezoneManual=Etc/GMT+2 fails and timed logs warning: ERROR: rejecting invalid timezone: 'Iso8601/-0200' This happens because /usr/share/tzdata-timed/zone.alias config record Iso8601/-0200 Iso8601/-02:00 Iso8601/-02 Etc/GMT+2 is processed by timed in a way that makes other names to be aliases for the first one - without considering whether corresponding data files are actually available or not. And in this case: there is no timezone data file for Iso8601/-0200 (but one for Etc/GMT+2 does exist). Rewrite the zone.alias parsing so that the first entry that exists in device file system is treated as timezone name and the rest as aliases. Signed-off-by: Simo Piiroinen <simo.piiroinen@jolla.com>
- Loading branch information
Showing
1 changed file
with
42 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters