Bug#292269: found the problem (fix included)
Lee Revell
Lee Revell <rlrevell@joe-job.com>, 292269@bugs.debian.org
Sat, 12 Feb 2005 20:26:17 -0500
OK, after filing a Gnome bug report and being informed that clock-applet
does no such thing, I discovered a Debian patch is responsible for the
bogus behavior. It's 04_clockapplet_reload_timezone.patch.
Reverting this patch should restore clock-applet's CPU usage to an
acceptable level. TZ changes will no longer be detected, but the
current approach clearly imposes an unreasonable cost of 20+ system
calls per second.
--- applets/clock/clock.c.orig 2004-12-08 18:52:20.000000000 +0100
+++ applets/clock/clock.c 2004-12-09 21:28:33.000000000 +0100
@@ -330,6 +330,14 @@
char date[256], hour[256];
char *utf8, *loc;
+ /* Setting "TZ" environment to another location say "" */
+ setenv("TZ","",1);
+ time_t tmptime_t=time(NULL); /* These variables are not*/
+ struct tm *tmtmp=localtime(&tmptime_t);/* using further */
+ /* Resetting "TZ" to original location "/etc/localtime"
+ then only it can refresh according to the New timezone */
+ setenv("TZ", "/etc/localtime", 1);
+
time (&cd->current_time);
if (cd->gmt_time)