Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-28-2008, 10:59 PM   #1
LQ Newbie
Registered: Apr 2008
Posts: 8

Rep: Reputation: 0
hardware-clock synchronization


How do i synchronize hardware-clock with system-clock without using 'hwclock' and 'NTP'?
Is there any way to do this job with programming?
Old 04-29-2008, 12:59 AM   #2
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 493

Rep: Reputation: 50
Look for adjtimex function
Old 04-29-2008, 01:07 AM   #3
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 493

Rep: Reputation: 50
No sorry, adjtimex is for system clock (as NTP, NTP doesn't deal with your RTC).
Take a look to the ioctl provided for /dev/rtc, or download "hwclock" sources to see how it does the job.
Old 05-02-2008, 07:54 AM   #4
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
2 Q's:
I'm curious (not critical), why the objection to hwclock?
(Does it relate to:)

Is there anyway to get the actual, the raw, BIOS h/w clock time from the CLI? In other words to verify that it is set to UTC as I intend & have told hwclock?

I have read the hwclock man page & I don't see any way to do this. If I am reading it correctly, I tell hwclock which I think it, the BIOS clock, is set to, but there is no way to verify that my intentions have been carried out (& not changed), short of rebooting & checking the BIOS Setup.


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
System clock correct, hardware clock wrong karlovac Linux - General 5 01-16-2009 07:19 PM
Failed to set system clock to hardware clock jrtayloriv Linux - Newbie 2 09-25-2008 07:06 AM
clock synchronization rasejo Linux - General 12 07-12-2007 06:53 PM
Slow system clock and stray hardware clock, pleas help! Epox Linux - General 6 01-02-2007 02:43 PM
RAID hardware : synchronization probelm arunka Linux - Hardware 0 02-08-2006 12:25 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:55 PM.

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