• Simo Piiroinen's avatar
    [aliases] Improve timezone alias data handling. Fixes JB#53711 · ba3a0a40
    Simo Piiroinen authored
    "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: default avatarSimo Piiroinen <simo.piiroinen@jolla.com>
    ba3a0a40
Name
Last commit
Last update
rpm Loading commit data...
src Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
COPYING Loading commit data...
README Loading commit data...
copyright Loading commit data...
timed.pro Loading commit data...