Red Hat Bugzilla – Bug 110672
localtime() always shows UTC
Last modified: 2007-11-30 17:06:59 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030922
Description of problem:
The clock applet in the gnome panel only displays UTC time. The system
is set to store time as UTC time. The timezone information is
correctly set. The "date" command at the prompt displays the correct
local time. The adjust time and date dialog for the clock applet also
displays the correct local time. The UTC checkbox is not checked.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. set system time to UTC time
2. set timezone
3. applet displays UTC time not local time
Actual Results: UTC time
Expected Results: Local time
I rebooted the system and the display corrected itself to local time
and not UTC time. Apologies for the wasted bandwidth.
Closing as NOTABUG based on comment #1
I'm having the same problem, my system time is not set to UTC but the
applet only displays time in UTC. Reboot doesn't solve the problem.
After several reboots the clock is working correctly again. But I'm
sure there is something wrong with it, IÂ´ll perform another
installation, see what happens and report back.
We are seeing this bug in a fresh install of RHEL3 U2 in the Brisbane
office. Very frustrating. It isn't the clock's fault though, because
outgoing mail from Evolution has the wrong time of day too.
Sarah said that it was fine on her RHEL3 U2 install for a day, until
she enabled ntp to automatically sync time, and subsequently it was
problematic. Investigating further...
Sarah disabled ntp and it returned back to normal. I am unable to
reproduce this problem on an identical RHEL3 U2 install on vmware.
This is either a problem with glibc, or more likely the configuration
what is in /etc/sysconfig/clock ??
how do you set your timezone?
should be used...
Sarah is unwilling to subject her personal laptop to testing, so until
we manage to reproduce this on another box we cannot debug it. =(
Contents of /etc/sysconfig/clock on my system:
We have seen this, or something much like it, on fresh RHEL3 installs
with timezone set to PST and an NTP timeserver setup. Both on GUI
installs and on kickstart installs. Going back with the dateconfig
and setting the TZ to something different and then setting it back
seems to resolve the problem for us.
In all cases, the system hardware clock is running UTC and the system
is configured to connect to a V3 (no encryption) NTP server for syncro.
/etc/localtime may have the wrong permissions.
Please check, that it is readable by any user!
[bgsmith@pico bgsmith]$ ls -l /etc/localtime
-rw-r--r-- 1 root root 1037 May 17 19:34 /etc/localtime
I should note that on my system (rhel 3) this is no longer an issue. I
apologize that I cannot recall what I did, or what was done to correct