GNOME Bugzilla – Bug 19197
clock applet should periodically recheck the timezone
Last modified: 2015-03-24 13:00:31 UTC
Package: gnome-applets Version: 1.2.0 Severity: normal >Originator: Christian Marillat >Organization: net >Synopsis: another_clock_applet should periodically recheck the timezone >Class: sw-bug >Gnome-Libs-Release: gnome-libs-1.2.4 >Environment: Linux 2.2.14 System: Linux falcon.wanadoo.fr 2.2.16 #1 jeu jun 8 12:24:33 CEST 2000 i686 unknown Architecture: i686 Distribution: Debian Version: 2.2 >Description: [This is a Debian bug report #61611, reported by Thomas Bushnell BSG <tb@MIT.EDU>] As I write this bug report, I'm in an airplane flying from Boston to Los Angeles. I just updated the timezone with tzconfig, from US/Eastern to US/Pacific. The ate' utility now reports the new timezone. However, another_clock_applet, already running on my desktop, has not rechecked the timezone, so it still displays the time as it is back in Boston. When the timezone changes, the system should take note. For most programs this isn't as necessary, but gnome is supposed to not require me to log out and back in when my configuration changes, Debian is supposed to be "spiffy" about such dynamic updates, and panel applets can be expected to run a long time. Christian ------- Bug moved to this database by debbugs-export@bugzilla.gnome.org 2001-01-27 16:59 ------- This bug was previously known as bug 19197 at http://bugs.gnome.org/ http://bugs.gnome.org/show_bug.cgi?id=19197 Originally filed under the gnome-applets product and general component. The original reporter (marillat.christian@wanadoo.fr) of this bug does not have an account here. Reassigning to the exporter, debbugs-export@bugzilla.gnome.org. Reassigning to the default owner of the component, gnome-applets-maint@bugzilla.gnome.org.
All the clocks should do this, I think. The only way to get them to notice is to start a new clock. I used to have a very funny example screenshot of this with two clocks next to each other showing different times: one was running, then I reset the clock, then added the second one. Two different answers. Ugh :)
Should be fixed for 2.0 I guess.
Minor as this is pretty much an edge case.
going to move to gnome-panel. The regular clock applet should do this too. It kind of does, but isn't dependable enough. I tried this using redhat's time config tool.
*** Bug 95011 has been marked as a duplicate of this bug. ***
Has anyone tested this in a later release?
This bug is still here in 2.0.10
Still in 2.2
Still here in 2.2.1. I've been confused about this for a while and finally figured out that this is the behavior. I had gotten quite confused about the time-config tool's behavior. When I switched timezones I'd use time-config to change the timezone and then I'd have to adjust the clock time as well. But to get the time on the panel applet right I'd have to set the system clock wrong. Then the next day when I logged out and back in, the clock would be wrong again.
*** Bug 130913 has been marked as a duplicate of this bug. ***
From http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=91804: I think this is essentially a C library limitation, it does not reload the timezone info until you restart the process. (clock is not a separate process, just part of the panel; "killall gnome-panel" should get you a new timezone clock) We can probably come up with some hack to fix it.
Created attachment 30029 [details] [review] Patch file for the Clock - Timezone problem. You should not normally need to set `TZ'. If the system is configured properly, the default time zone will be correct. You might set `TZ' if you are using a computer over a network from a different time zone, and would like times reported to you in the time zone local to you, rather than what is local to the computer. If the `TZ' environment variable does not have a value, the operation chooses a time zone by default. In the GNU C library, the default time zone is like the specification `TZ=:/etc/localtime' (or `TZ=:/usr/local/etc/localtime', depending on how GNU C library was configured So when the time zone is changed we should have to change the TZ Environment variable to /etc/localtime. By derault /etc/localtime will be null. After changing the timezone, All informations will be loaded to here. So /etc/localtime will now contain the new timezone information. But in localtime.c, it returns the localtime according to the timezone, only if the TZ pointer changes. TZ pointer never changes its location (/etc/localtime), only the content of /etc/localtime is changing. initially changing the TZ to null using setenv ("TZ","",1); then calling the localtime. after it sets to original location using setenv ("TZ","/etc/localtime",1); then again calling the localtime. Now it returs exact value.
> You should not normally need to set `TZ'. On a laptop, I like to set the time zone to be correct wherever I go. (Or do I misunderstand you.)
Okay, recent changes in glibc is going to fix this. Changes to /etc/localtime will be noticed and the file will be re-read. I think the fixes will be in glibc 2.3.4. See: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=133481 Closing as NOTGNOME.