Incorrect System Time in Debian Etch

[Update on September 12, 2007: I just found out that a possible reason that the system time is incorrect is because I install the 32-bit Debian on a 64-bit machine. After I reinstall the 64-bit amd64 Debian Etch, the system time is fine.]

After network installing Debian Etch on my Desktop computer at school (dual boot with Windows XP), I found that the system time is incorrect. With the same minimal installation CD, I also install it on my laptop. However, the system time on my laptop is correct. After spending some time on the Internet, I found how to fix this problem as follows.

1) Check if the UTC is set to no in the ‘/etc/default/rcS’ file. If it is not, change it to no.

2) If the problem is not because of the first UTC above, we have to edit the ‘/etc/init.d/hwclock.sh’ file.

>su

>vi /etc/init.d/hwclock.sh

Look for a line containing, HWCLOCKPARS=

Add the following text after the equal sign, “–directisa –localtime”

So, the complete text should be,

HWCLOCKPARS=”–directisa –localtime”

Notice that double quotes must be put on the line.

Then, we have to restart the hwclock.sh by,

>/etc/init.d/hwclock.sh restart

If the time is still wrong, we have to change the time manually by right clicking on the time icon and changing it. Then, we have to restart the hwclock.sh again. To check if the change takes effect, try to restart the computer. Time should be displayed correctly after restarting the computer.

Advertisements
This entry was posted in Linux. Bookmark the permalink.

One Response to Incorrect System Time in Debian Etch

  1. bened says:

    Hi! The second point worked for me. Thanks alot! But watch out with the code for /etc/init.d/hwclock.sh: the two minus-signs became a dash on this webpage and the quote-chars are typographical. So if anyone just uses copy&paste it won’t work.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s