[Bug 1554806] Re: Change of behavior: "dpkg-reconfigure -f noninteractive" unconditionally overwrites /etc/timezone now
Lars Kruse
1554806 at bugs.launchpad.net
Mon Nov 27 02:10:43 UTC 2017
According to the upstream package maintainer in Debian (Aurelien Jarno),
/etc/localtime is the authoritive source of information, while
/etc/timezone is just a Debian-specific artifact.
Thus the preferred approach for changing the timzone is indeed the
change of the /etc/localtime symlink, followed by dpkg-reconfigure.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813226#10 and
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848143#10.
** Bug watch added: Debian Bug tracker #813226
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813226
** Bug watch added: Debian Bug tracker #848143
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848143
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to tzdata in Ubuntu.
https://bugs.launchpad.net/bugs/1554806
Title:
Change of behavior: "dpkg-reconfigure -f noninteractive"
unconditionally overwrites /etc/timezone now
Status in tzdata package in Ubuntu:
Confirmed
Bug description:
In previous versions it was possible to set the system's timezone by
editing /etc/timezone before running "dpkg-reconfigure -f
noninteractive tzdata".
This behavior changed, /etc/timezone gets overwritten unconditionally during "dpkg-reconfigure -f noninteractive tzdata":
---
root at xenial:/# echo "Europe/Berlin" > /etc/timezone
root at xenial:/# cat /etc/timezone
Europe/Berlin
root at xenial:/# dpkg-reconfigure -f noninteractive tzdata
Current default time zone: 'Etc/UTC'
Local time is now: Tue Mar 8 23:09:39 UTC 2016.
Universal Time is now: Tue Mar 8 23:09:39 UTC 2016.
root at xenial:/# cat /etc/timezone
Etc/UTC
---
As a workaround to programmatically set the timezone one now needs to point "/etc/localtime" to the new timezone:
---
root at xenial:/# ln -fs /usr/share/zoneinfo/Europe/Berlin /etc/localtime
root at xenial:/# ll /etc/localtime
lrwxrwxrwx 1 root root 33 Mar 9 00:48 /etc/localtime -> /usr/share/zoneinfo/Europe/Berlin
root at xenial:/# cat /etc/timezone
Etc/UTC
root at xenial:/# dpkg-reconfigure -f noninteractive tzdata
Current default time zone: 'Europe/Berlin'
Local time is now: Wed Mar 9 00:49:05 CET 2016.
Universal Time is now: Tue Mar 8 23:49:05 UTC 2016.
root at xenial:/# cat /etc/timezone
Europe/Berlin
---
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/1554806/+subscriptions
More information about the foundations-bugs
mailing list