COHERENT manpages

This page displays the COHERENT manpage for ATclock [Read or set the AT realtime clock].

List of available manpages
Index


ATclock -- Command

Read or set the AT realtime clock
/etc/ATclock [yy[mm[dd[hh[mm[.ss]]]]]]

ATclock reads  or sets your system's ``hardware'' time,  which is stored in
your system's  CMOS.  This clock  should contain the  current standard time
for your locale.

With no argument, the command  ATclock reads the hardware clock and returns
a string in  the format expected by the command  date. With an argument, it
sets  the hardware  clock to  the  given date.   For example,  to set  your
hardware clock to October 24, 1994, at 9:30 PM, use the command:

    /etc/ATclock 9410242130

ATclock also lets you reset the  time incrementally: that is, you can reset
only the year; the year and month; the year, month, and day; and so on down
to the second.

Note that if  you use ATclock to reset your  hardware clock, you must reset
it  to the  standard time  in  your locale,  even if  daylight-savings time
happens  to  be  in effect  when  you  reset the  clock.   If  you do  not,
COHERENT's  commands that  set the  local  time on  your system  (e.g., the
command date)  will be  off by  one hour when  daylight-savings time  is in
effect.

The system startup file /etc/brc typically contains a command of the form

    date -s `/etc/ATclock`

to reset the time properly when the COHERENT system starts up.

See Also

brc,
clock,
CMOS,
commands,
date