time-admin and libc6.postinst have different ideas about time zone config

Bug #11230 reported by Daniel Silverstone
12
Affects Status Importance Assigned to Milestone
gnome-system-tools (Ubuntu)
Fix Released
High
Sebastien Bacher

Bug Description

I upgraded from warty to hoary and it reset my timezone to Europe/London from
Europe/Madrid which I had set it to using the gnome time/date changing thingy

This is bad because it stomped on a user setting

http://bugzilla.gnome.org/show_bug.cgi?id=167035: http://bugzilla.gnome.org/show_bug.cgi?id=167035

Revision history for this message
Matt Zimmerman (mdz) wrote :

Did you investigate how this might have happened? What was in /etc/timezone,
and where did /etc/localtime point? Were they consistent? And now? Try using
the GNOME tool again, and see if it does the right thing. It seems more likely
that that tool did the wrong thing, than that libc6 clobbered your choice

Revision history for this message
Daniel Silverstone (dsilvers) wrote :

A hoary upgrade yesterday (hoary -> hoary dist-upgrade) seems to have lost the
timezone too.

libc6 was upgraded during that process, unfortunately along with a whole bunch
of other things too.

I'll do a bit more investigation

Revision history for this message
Daniel Silverstone (dsilvers) wrote :

After investigation it seems to me that the issue is an interaction between
libc6's postinst configure and the way that the gnome time-admin tool updates
the timezone.

the time-admin tool updates /etc/localtime with the new timezone

the libc6 stuff reads /etc/timezone and updates /etc/localtime with the
'default' timezone when it is reconfigured (upgraded, dpkg-reconfigure etc)

This either means that the libc6 stuff needs to decide whether or not
/etc/localtime has been stomped on; or else we need /etc/localtime to be a
symlink rather than a file, or the time-admin tool needs to update /etc/timezone too

I'll leave it up to you guys to work out which is more correct.

Revision history for this message
Stuart Bishop (stub) wrote :

I can confirm this. I have seen it at least twice. You only notice it of course
when you are in a timezone different to the one you installed in. It has
happened to me in Mataro, and now in Capetown.

Revision history for this message
Colin Watson (cjwatson) wrote :

tzsetup in base-config consistently updates both the /etc/timezone file and the
/etc/localtime symlink. I think time-admin should do the same.

Revision history for this message
Sebastien Bacher (seb128) wrote :

I've opened a bug upstream asking to update /etc/timezone too:
http://bugzilla.gnome.org/show_bug.cgi?id=167035

Revision history for this message
Sebastien Bacher (seb128) wrote :

This upload fixes the issue:

 system-tools-backends (1.2.0-0ubuntu5) hoary; urgency=low
 .
   * debian/patches/01_timezone.patch:
     - update /etc/timezone too (Hoary: #4728).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.