Glomation
 
Advanced Search
Welcome, Guest. Please login or register.

Login with username, password and session length
May 20, 2012, 02:46:00 AM
News: Glomation introduced new wireless ready low cost GESBC-9260S
Pages: [1]
Topic Tools  
Read January 27, 2012, 02:42:02 PM #0
andrew

setting hardware clock

I am able to set the hardware clock using the busybox hwclock app.  Is it possible to set the hardware clock by opening /dev/rtc and doing an ioctl to it, like this: http://stackoverflow.com/questions/202116/how-do-you-programmatically-set-the-hardware-clock-on-linux
I tried doing this and it returns success but doesn't actually change the hardware clock in any way.

Is the busybox source available somewhere so I can see how its hwclock app does this?
 
Read January 30, 2012, 02:43:15 PM #1
admin

Re: setting hardware clock

The Busybox source is available at http://www.busybox.net/
 
Read January 31, 2012, 03:55:05 PM #2
andrew

Re: setting hardware clock

For anyone interested, the specific busybox source is here: http://git.busybox.net/busybox/tree/util-linux/hwclock.c
Setting the hardware clock does work using the stackoverflow code I linked before.  I had something else wrong that was preventing it from working.
 
Pages: [1]
Jump to:  

Theme Update by Runic Warrior Originally created by m3talc0re