.if n .ds Q \&" .if t .ds Q `` .if n .ds U \&" .if t .ds U '' .TH "CLOCK" 8 .tr \& .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \\n(ll>0 \{\ .ie \\n(bi=1 \{\ .nr bi 0 .if \\n(t\\n(ll=0 \{.IP \\(bu\} .if \\n(t\\n(ll=1 \{.IP \\n+(e\\n(el.\} .\} .el .sp .\} .el \{\ .ie \\nh=1 \{\ .LP .nr h 0 .\} .el .PP .\} .. .SH NAME .Pp \fBclock\fP - manipulate the CMOS clock .Pp .SH SYNOPSIS .Pp \fBclock \f(CR[\fP\fB-u\fP\f(CR] [\fP\fB-rwsa\fP\f(CR] [\fP\fB-v\fP\f(CR\fB]\fP\fP\fP .Pp .SH DESCRIPTION .Pp \fBclock\fP manipulates the CMOS clock in variaous ways, allowing it to be read or written, and allowing synchronization between the CMOS clock and the kernel's version of the system time. .Pp .SH OPTIONS .Pp .nr ll +1 .nr t\n(ll 2 .if \n(ll>1 .RS .IP "\fB-u\fP" .nr bi 1 .Pp indicates that the CMOS clock is set to universal time .IP "\fB-r\fP" .nr bi 1 .Pp read CMOS clock and print the result to stdout .IP "\fB-w\fP" .nr bi 1 .Pp write the system time into the CMOS clock .IP "\fB-s\fP" .nr bi 1 .Pp set the system time from the CMOS clock .IP "\fB-a\fP" .nr bi 1 .Pp set the system time from the CMOS clock, adjusting the time to correct for systematic error, and writting it back into the CMOS clock. .IP "\fB-v\fP" .nr bi 1 .Pp print version number .if \n(ll>1 .RE .nr ll -1 .Pp The \fB-a\fP option uses the file \fI/etc/adjtime\fP to determine how the clock changes. It contains three numbers: .nr ll +1 .nr el +1 .nr t\n(ll 1 .nr e\n(el 0 1 .af e\n(el \*(f\n(el .if \n(ll>1 .RS .nr bi 1 .Pp the correction in seconds per day (for example, if your clock runs 5 seconds fast each day, the first number should read -5.0), .nr bi 1 .Pp time when \fBclock\fP was last used, in seconds since 1/1/1970, .nr bi 1 .Pp the remaining part of a second that was left over after the last adjustment. .if \n(ll>1 .RE .nr el -1 .nr ll -1 .Pp The following instructions are from the source code: .nr ll +1 .nr el +1 .nr t\n(ll 1 .nr e\n(el 0 1 .af e\n(el \*(f\n(el .if \n(ll>1 .RS .nr bi 1 .Pp create a file \fI/etc/adjtime\fP containing as the first and only line: '0.0 0 0.0', .nr bi 1 .Pp run \fBclock -au\fP or \fBclock -a\fP, depending on whether your CMOS is in Universal or Local Time. This updates the second number, .nr bi 1 .Pp set your system time using the \fBdate\fP command, .nr bi 1 .Pp update your CMOS time using \fBclock -wu\fP or \fBclock -w\fP, .nr bi 1 .Pp replace the first number in \fI/etc/adjtime\fP by your correction, .nr bi 1 .Pp put the command \fBclock -au\fP or \fBclock -a\fP in your \fI/etc/rc.local\fP, or let \fBcron\fP start it regularly. .if \n(ll>1 .RE .nr el -1 .nr ll -1 .Pp .SH FILES .Pp \fI/etc/adjtime\fP .Pp \fI/etc/rc.local\fP .Pp .SH AUTHORS .Pp .nr ll +1 .nr t\n(ll 2 .if \n(ll>1 .RS .IP "\fBV1.0\fP" .nr bi 1 .Pp Charles Hedrick, hedrick@cs.rutgers.edu, Apr 1992 .IP "\fBV1.1\fP" .nr bi 1 .Pp Modified for clock adjustments, Rob Hooft, hooft@chem.ruu.nl, Nov 1992 .IP "\fBV1.2\fP" .nr bi 1 .Pp Patches by Harald Koenig, koenig@nova.tat.physik.uni-tuebingen.de, applied by Rob Hooft, hooft@EMBL-Heidelberg.DE, Oct 1993 .IP "\fBV1.3\fP" .nr bi 1 .Pp Changes from alan@spri.levels.unisa.edu.au (Alan Modra) .IP "\fBV1.4\fP" .nr bi 1 .Pp Fix for years > 2000 alan@SPRI.Levels.UniSA.Edu.Au (Alan Modra), and added \fB-v\fP option to print version faith@cs.unc.edu, Feb 1995. .IP "\fBV1.4a\fP" .nr bi 1 .Pp Converted to be compatible with the SPARC /dev/rtc driver Tom Dyas (tdyas@eden.rutgers.edu), Aug 1996 .IP "\fBV1.4b\fP" .nr bi 1 .Pp Adapted for Power Macintosh by Paul Mackerras, Dec 1996 .if \n(ll>1 .RE .nr ll -1 .Pp