Bug 88636

Summary: Timezone list in korganizer only shows [no selection]
Product: [Applications] korganizer Reporter: Michael Denio <Michael.Denio>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Fix timezone list on linux

Description Michael Denio 2004-09-01 22:31:30 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    Compiled From Sources
Compiler:          gcc 3.2.3-20 
OS:                Linux

I see in koprefsdialog.cpp that the current timezone is read from /etc/timezone however I don't have an /etc/timezone file.  I have /etc/localtime which is what is mentioned in the man page for tzset.  It then uses:

f = popen("grep -e  ^[^#] /usr/share/zoneinfo/zone.tab | cut -f 3","r");

to get a list of time zone names.  I also do not have a zone.tab file in that directory but a list of timezone files.  We also install most of linux on a readonly afs filesystem which supports multiple os configurations under the same path.  This means everything in usr/share/zoneinfo is a symbolic link.  This comes into play when you use things like "find" which the Solaris code within the function does.  In that case you have to pass "-follow" to find.
Comment 1 Michael Denio 2004-09-08 15:05:47 UTC
Created attachment 7453 [details]
Fix timezone list on linux

This is a patch against release 3.3
Comment 2 Michael Denio 2004-09-08 15:06:41 UTC
I patched the file to look for /etc/localtime and for linux to read the directory entries in zoneinfo if zone.tab isn't present.  I've included my patch file.
Comment 3 Bram Schoenmakers 2006-05-16 23:52:57 UTC
I must admit that my knowledge about timezones is limited, so I was wondering about this line:

-      if((f = fopen("/etc/timezone", "r")) != NULL) {
+      if((f = fopen("/etc/localtime", "r")) != NULL) {

Is there no Linux distro using /etc/timezone these days?
Comment 4 Reinhold Kainhofer 2006-11-02 18:52:12 UTC
Reassigning all KOrganizer bug reports and wishes to the newly created 
korganizer-devel mailing list.
Comment 5 Bruno Virlet 2007-07-26 18:03:28 UTC
This is fixed in KDE4, it uses kdelibs which has all the platform-dependant code.