.TH ATclock "" "" "Command"
.PC "Read or set the AT realtime clock"
\fB/etc/ATclock \fI[yy[mm[dd[hh[mm[.ss]]]]]]\fR
.PP
.HS
With an argument, \fBATclock\fR sets your computer's realtime clock.
With no argument, it reads it.
.HE
.B 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.
.PP
With no argument, the command
.B ATclock
reads the hardware clock and returns a string in the format expected
by the command
.BR 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:
.DM
	/etc/ATclock 9410242130
.DE
.PP
.B 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.
.PP
Note that if you use
.B ATclock
to reset your hardware clock, you
.I 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, \*(CO's commands that set the local time on your system
(e.g., the command
.BR date )
will be off by one hour when daylight-savings time is in effect.
.PP
The system startup file
.B /etc/brc
typically contains a command of the form
.DM
	date -s \(ga/etc/ATclock\(ga
.DE
.PP
to reset the time properly when the \*(CO system starts up.
.SH "See Also"
.Xr brc, brc
.Xr clock, clock
.Xr CMOS, cmos
.Xr commands, commands
.Xr date date
