Bug#767593: timedatectl: does not notice corrupted zoneinfo files
David Schmitt
david at dasz.at
Sat Nov 1 11:03:10 GMT 2014
Package: systemd
Version: 215-5+b1
Severity: minor
Hi,
due to local problems, my zoneinfo file was corrupted (content replaced
with garbage). Setting the timezone with timedatectl set-timezone lead
to the timezone being set to UTC, but using the correct name.
root at zion:/etc# timedatectl # correct here.
Local time: Sam 2014-11-01 11:54:45 CET
Universal time: Sam 2014-11-01 10:54:45 UTC
RTC time: Sam 2014-11-01 10:54:45
Time zone: CET (CET, +0100)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: no
Last DST change: DST ended at
Son 2014-10-26 02:59:59 CEST
Son 2014-10-26 02:00:00 CET
Next DST change: DST begins (the clock jumps one hour forward) at
Son 2015-03-29 01:59:59 CET
Son 2015-03-29 03:00:00 CEST
root at zion:/etc# ls -la timezone localtime
lrwxrwxrwx 1 root root 25 Nov 1 11:50 localtime ->
../usr/share/zoneinfo/CET
-rw-r--r-- 1 root root 4 Nov 1 11:50 timezone
root at zion:/etc# timedatectl set-timezone Europe/Vienna
root at zion:/etc# date
Sam Nov 1 10:54:56 UTC 2014
root at zion:/etc# timedatectl # "valid", but not what's intended
Local time: Sam 2014-11-01 10:55:01 UTC
Universal time: Sam 2014-11-01 10:55:01 UTC
RTC time: Sam 2014-11-01 10:55:01
Time zone: Europe/Vienna (UTC, +0000)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
root at zion:/etc# ls -la timezone localtime
Given that zoneinfo files have an obvious magic number and the garbage
file hadn't one, it'd be really great if timedatectl could do basic
sanity checks before loading the file and creating an "invalid"
configuration.
Thanks and regards, David
--
* Always looking for people I can help with awesome projects *
G+: https://plus.google.com/+DavidSchmitt
Blog: http://club.black.co.at/log/
LinkedIn: http://at.linkedin.com/in/davidschmitt
More information about the Pkg-systemd-maintainers
mailing list