Caching local time zone

Shaheed srhaque at
Sun Sep 24 08:11:14 BST 2006

On Saturday 23 September 2006 17:55, David Jarvie wrote:
> >  On SUSE 10.1 I have no TZ and /etc/localtime seems to be a hardlink, so
> > that doesn't help with finding the timezone either (and, with TZ, I
> > wonder, how do you change that if you change the timezone - or will that
> > be forbidden while KDE is running?).
> A good point - presumably TZ won't any longer reflect the system time zone
> if it's changed after KDE (or any other process) has started up. If that's
> true, many processes (KDE and non-KDE) would fail to determine the new time
> zone since using TZ is the standard glibc way of accessing it. So changing
> time zone might really require a reboot to be certain that everything has
> recognised the change. Or is this supposition too far-fetched?

In principle, I believe a reboot is indeed needed. But since TZ is largely a 
UI-only thing, and hence typically of no interest to server-like system 
processes, this becomes another reason for having the per-user KDE support I 
described. That way, logout/login would also be enough.

> > > (Looking at the code, it's
> > > possible that the same files might be read twice - at initialisation
> > > and when finding the local time zone. I'll investigate that.)
> >
> >  Twice is not really the problem, the second one is cached. The problem
> > is that the first one is not.
> The second one won't necessarily be cached when hundreds of files need to
> be reread.

More information about the kde-core-devel mailing list