Fedora 9 and UTC time problem

Fedora 9 was released I installed it on my laptop next to the pre-installed Fedora 8 and Windows XP. There are some issues with the release, like nVidia drivers, but I was expecting such things. However, there was one small problem that didn’t make since at first which is the time settings.

Whenever I change from Fedora 8 or Windows XP to the new Fedora 9  or vice versa the time of my machine will change, it will go backward or forward with a fixed offset, and I knew it is a problem with timezone. So before I explain the problem I would like to mention that each machine has a clock that works even if the machine is turned off, using a battery that is connected to the motherboard, and when the operating system boots it will read the time from that clock.

For Windows OS, the time that is shown to you in the taskbar is the same time of the hardware clock, and when you change your time in Windows, it will update the hardware clock to reflect the same change. So let say that you are in a city with timezone ” -6 ” and Windows is set to that zone, then the hardware clock will have the time of that zone also. However, Unix, and Unix compatible OS like Linux, assumes the hardware clock to be set to the UTC “coordinated universal time” (which is also called GMT) and it will calculate the local time based on the selected timezone (by adding the offset to the time).

If you have a system with dual boot Windows and Linux you will have this problem, but lucky we are that Linux has the option to assume the hardware clock to be the local-time instead of UTC and it will ack like Windows and that will solve the problem.

So after remembering all of that I tried to loacate this option under my Feroa 9 which tells it to treat the machine clock as a local-time instead of UTC, but I could not find it any where, and after some digging I discovered that since I installed KDE4 only with my new installation, the tool that allows this is based on Gnome desktop and it is called “system-config-time”. But I am still wondering why KDE4 does not have a GUI for that!! even in the older version!!

The time/date control under KDE 4 and it has no option to tell it if the machine clock is set to local-time or UTC

So I installed this tool and I found that the option for UTC time is checked and I have to uncheck it to resolve the problem.

Date/Time control under Gnome and it has the option to say the hardware (System) clock is using UTC or local-time

Unfortunately it did not work and it gave me an error message after I clicked the OK button and it did not change the settings:


File "/usr/lib/python2.5/shutil.py", line 41, in copyfile
raise Error, "`%s` and `%s` are the same file" % (src, dst)
shutil.Error: `/usr/share/zoneinfo/America/Chicago` and `/etc/localtime` are the same file

Finally after more google search I found this command line program “timeconfig” (which is text version of the system-config-date) which I used to successfully change the way Linux uses the time stored in my machine.

A command line application that allowed me to set the right time configuration

From my understanding, both tools the GUI “system-config-date” and the text based “timeconfig” are developed by Redhat, and since they use Gnome as their default destop management they tend to build their tools based on that. However, I like KDE more since it provides me with things that Gnome can’t. So do I have to suffer for that?

Is this Redhat problem or KDE should develope all of these things?

Any way, I am happy now that my problem is fixed, but I hope the option will be available in KDE 4.1.

9
Leave a Reply

avatar
9 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
8 Comment authors
JDdudU0bluezoneFahad Alduraibi Recent comment authors

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
newest oldest
Notify of
Alireza Kazemi
Guest
Alireza Kazemi

Hello,

I had the same problem and I guessed it may be a cause of UTC option. (I’m from Iran +03:30 UTC). I fixed it but to be sure before rebooting the system i lunched a goggle search an found your comment.

Anyway thank you for your comment. 🙂

oyra
Guest
oyra

Hi,

I tried timeconfig (python timeconfig.py). I’ve managed to uncheck UTC setting, but every time I try to adjust date & time it is not happening 🙁 . I use gnome instead of kde (kde4.1 waiting mode : on).

thanks

oyra
Guest
oyra

just found out this morning,

after changing the UTC setting via timeconfig, use System>Administration>Date & Time instead of right-click>Adjust Date & Time from gnome-applet.

thanks

jimmy the weasel
Guest
jimmy the weasel

You found a way to fix it.

Just be happy

Fahad Alduraibi
Guest

I would like to thank you all for you comments.

Jimmy: No I did not find a fix, I just posted this work around hoping to help others who have had the same problem that I had. And I am waiting for this issue to be fixed by Redhat or KDE people.

Regards…

bluezone
Guest
bluezone

works. good job

U0
Guest
U0

The best way to solve the problem is to use following command. You have to be under su.
/sbin/hwclock –systohc –localtime

I have used it and it is working fine.

I got this from http://www.yolinux.com/TUTORIALS/LinuxTutorialSysAdmin.html#TIME

dud
Guest
dud

Hello,

you can change this setting simply by editing the file /etc/sysconfig/clock (no need to install any tool).

The hardware clock is automatically updated whenever the systems stops (check /etc/init.d/halt).

Nice post, times problem in dual boot systems are not always easy to manage 😉