On Tue, 2005-07-19 10:31:10 -0400, Ralf Baechle <firstname.lastname@example.org> wrote:
> On Tue, Jul 19, 2005 at 03:34:01PM +0530, Nori, Soma Sekhar wrote:
> > However, when I try to update the time using date -s <time string>
> > the RTC does not get updated. (shows the old time when I boot-up again)
Right, expected. date -s sets the time of the running system, not the
system's HW time.
> > In arch\mips\kernel\time.c the timer_interrupt calls rtc_set_mmss,
> > but that call is made only when STA_UNSYNC is _not_ set in time_status
> > variable. do_settimeofday/sys_stime _set_ this flag so the timer
> > interrupt does not call rtc_set_mmss.
Right. HW clock updating is somewhat supposed to work IFF ntp is
> > Can somebody please help me understand how the RTC is supposed to be
> > updated after user changes the time using the date command?
> Not at all. Try man hwclock.
hwclock is the userspace utility to manually once set the time. In
normal operation, this should only be called _once_, after the system is
switched on for the very first time.
During lifetime, ntpd should execute and thus the system's current time
will be written to the HW clock every now and then. Additionally, most
distributions seem to also update the HW clock at system shutdown time.
So the correct solution to your problem is to either shutdown once
(workaround) or keep ntpd running (the solution[tm]).
Jan-Benedict Glaw email@example.com . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
Description: Digital signature