Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 02-26-2009, 10:49 AM   #1
LQ Newbie
Registered: Jun 2004
Posts: 22

Rep: Reputation: 1
hardware clock time differs from system time after setting

I'm setting the hardware clock on RHEL 5.1 system using /sbin/hwclock --systohc. After setting the clock I issue a date command followed by a /sbin/hwclock --show from within a script to get fast resolution and I see that the hardware clock precedes the system time on average by .5 seconds. Does anyone have any idea why this would happen and how to fix it? I would think the clock should be identical after setting. thanks
Old 02-27-2009, 06:24 AM   #2
Senior Member
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
This might have something to do with the hwclock command waiting for a tick and not be a problem at all. To see what I am talking about:

hwclock --debug --show
(The --debug option is what most commands would call "verbose.")

I am not sure how you are determining it is, on average, 0.5 seconds behind since, TMK, the date command only has a resolution of 1 second. I do note that 0.5 seconds is the average of all possible values from 0 to 1 second.

EDIT: And please don't post the same question in more than one place. There is a reason that is against LQ rules ...

Last edited by blackhole54; 02-27-2009 at 06:35 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
hardware clock time differs from system time after setting maxgsp Linux - Software 2 02-28-2009 08:15 AM
System time vs Hardware time and Daylight Savings Time Toadman Linux - Networking 6 03-16-2007 08:14 PM
Where does RH8 daily set system time to hardware clock time smartnorman Red Hat 1 05-24-2006 03:42 PM
Setting the system clock to a time server? orange400 Linux - General 4 06-13-2005 02:59 PM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration