Novell is now a part of Micro Focus

Making Computer Clock Show Correct Time

Novell Cool Solutions: Tip

Digg This - Slashdot This

Posted: 2 Jun 2004

If you're using SUSE Linux and you find that the computer clock is never exactly right, this one's for you.

Your computer's time has probably been set with hwclock without paying much attention to its features. Here's how it works.

The RTC clock, i.e. the clock that keeps on working when the computer is switched off, does not usually work with exactness. The program hwclock can help correct this inaccuracy, in spite of lacking an NTP, by compensating a constant inaccuracy. The necessary data are saved in /etc/adjtime. To prevent the RTC clock from becoming even more inaccurate, it must be timed exactly to the second with hwclock or the timing process must be performed twice in a short interval.

Delete the file /etc/adjtime and set the time precisely with hwclock by means of an exact clock (e.g. a radio controlled clock). For example:

hwclock --set --date="7/22/01 17:45:05"

If the RTC clock's time is the GMT, the option -u has to be specified so that the time difference can be observed. In order to maintain the time as precisely as possible, this procedure should be repeated several times the week at first. The run-time difference will be calculated and, from then on, it will be automatically corrected. If these rules are observed, the clock will show the right time in the future.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates