Bug 212237

Summary: localtime set to something not in zone.tab confuses KDE
Product: [I don't know] kde Reporter: jay <tsuraan>
Component: generalAssignee: David Jarvie <djarvie>
Status: CLOSED FIXED    
Severity: normal CC: djarvie
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: All time zone files installed by Gentoo

Description jay 2009-10-28 22:09:10 UTC
Version:            (using KDE 4.3.2)
Compiler:          gcc 4.4.1 
OS:                Linux
Installed from:    Gentoo Packages

Gentoo ships a ton of zoneinfo files that are not in the format continent/city.  US/Central, for example.  These files do not show up in zone.tab, but appear to be hardlinks to files that are in zone.tab.  A selection of this links (from (cd /usr/share/zoneinfo && find -type f -exec ls -i {} \; | sort | less)) is:

2017225 ./America/Manaus
2017225 ./Brazil/West
2017226 ./America/Sao_Paulo
2017226 ./Brazil/East
2017269 ./America/Los_Angeles
2017269 ./US/Pacific
2017269 ./US/Pacific-New
2017284 ./America/Indiana/Knox
2017284 ./America/Knox_IN
2017284 ./US/Indiana-Starke
2017357 ./America/Chicago
2017357 ./US/Central

There are probably around a hundred Nation/Region files that don't show up in zone.tab, but are hardlinks to legitimate Continent/City files.

If a user has /etc/localtime linked to one of these files (I had /etc/localtime -> /usr/share/zoneinfo/US/Central), KDE's date and time will attempt to choose something similar (I got America/Cancun for my timezone; both are GMT-6, but Central has daylight savings).  Attempts to change this will appear to succeed but be reset on the next login, and attempts to delete .kde4/share/config/ktimezonedrc will result in it being re-created on the next login.  There is no warning or any other obvious indicator that this is happening; I just kept getting my KDE timezone set back to Cancun.
Comment 1 David Jarvie 2009-10-29 14:39:34 UTC
Created attachment 37945 [details]
All time zone files installed by Gentoo

Information supplied by Duncan (see http://lists.kde.org/?l=kde-linux&m=125681681910114&w=2):

Gentoo ships timezone-data pretty much as upstream ships it, at least in terms of the actual zoneinfo files (with the posix and leap- second changes listed above).  If other distributions trim stuff from what's shipped, that's their deal, but Gentoo ships the files upstream provides.  The bottom line is that those US/* files are in the upstream package.

There is one patch, which affects zoneinfo files as follows:

 - Install posix zoneinfo into zoneinfo/posix/ instead of zoneinfo-posix/ ala glibc
 - Install leaps zoneinfo into zoneinfo/right/ ala glibc

A complete list of the zoneinfo files included in the package is attached.
Comment 2 David Jarvie 2009-11-03 23:21:56 UTC
Actually, it turns out that Debian also installs a similar set of zoneinfo files - perhaps many distros do.

KDE will now accept time zone settings which use zones not in zone.tab. It won't offer them as options in the time zone selection list, though, except for the zone which is already set as the system time zone.

Fixed for KDE 4.3.4 (SVN commits 1044096, 1044097, 1044499, 1044500).