[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sys time to hw time WAS: two small ones
----- Original Message -----
From: "Hansen Martin" <DKDD0MAR@xxxxxxx.com>
To: "Dev-Etrax (E-mail)" <firstname.lastname@example.org>
Sent: Tuesday, May 28, 2002 16:47
Subject: sys time to hw time WAS: two small ones
> From: Johan Adolfsson [mailto:email@example.com]
> > Try running:
> > hwtestrtc -c1
> > to enable it and put that in the inittab or an init script.
> Is there a way other than writing a new program to store the current system
> time in the rtc.
> I update the system clock with rdate, but i dont know how to store this in
> the rtc, except writing a new c program or doing it manually.
> Of course my luck is that the output from rdate -p have the month in
> letters, and the hwtestrtc want it in number form. I had hoped I could just
> # hwtestrtc -s `rdate -p timeserver.dom`
> of course a command like hwclock --systohc would be preferable. eventually
> as a switch to hwtestrtc.
It might be possible to do some tricks using sed etc. but it is probably
easier to modify hwtestrtc to give it the options (or some of them)
that hwclock has, and perhaps let it install a link called hwclock
pointing to hwtestrtc.