KDED time zone module

David Jarvie lists at astrojar.org.uk
Sun Apr 1 16:46:26 BST 2007


On Sunday 01 April 2007 13:54:06 Thiago Macieira wrote:
> David Jarvie wrote:
> >The name is used as the index for looking up the KSystemTimeZone
> > instance so that the time zone data can be accessed by applications.
> > And for display purposes the local time zone name is needed. Note that
> > if the TZ environment variable is set, that is used to obtain the name.
> > Also note that, except on Solaris, country codes in zone.tab will
> > usually enable a match to be made quickly with /etc/localtime.
>
> How about a special KSystemTimeZone that is the local time zone? It
> doesn't have to map to any zone in the database.

The main problem here is that there won't be a name other than "local zone" to 
display in user-visible text, or to save as the identity of the time zone 
which a date/time is measured in. So in a time zone selection combo box, for 
example. "Local zone" would appear together with all the named time zones, 
and the user may not necessarily know which named zone was equivalent if 
using somebody else's computer or a computer far from home. Valid iCalendar 
file entries couldn't be written, for example, because when a time zone is 
being used, it has to be written with an unambiguous name. If you sent a 
meeting invitation to somebody in another time zone with "local zone" 
specified for the time, it wouldn't show correctly in the invitee's calendar. 
No doubt there are other examples where the time zone name is essential.
  
> Remember that $TZ point to any file on disk.

Ah! The current code has a bug here - it assumes that the file referred to is 
a relative path from zoneinfo/, so it needs to be fixed. But if it is some 
other file and it doesn't match a zoneinfo one, it might still be valid but 
because the name of the time zone can't be determined, it would lead to the 
problems mentioned above.

-- 
David Jarvie.
KAlarm author and maintainer.
http://www.astrojar.org.uk/kalarm




More information about the kde-core-devel mailing list