.\" Copyright 1992 Rickard E. Faith (faith@cs.unc.edu) .\" May be distributed under the GNU General Public License .TH CLOCK 8 "24 December 1992" "Linux 0.99" "Linux Programmer's Manual" .SH NAME clock \- manipulate the CMOS clock .SH SYNOPSIS .B "/sbin/clock [ -u ] -r" .br .B "/sbin/clock [ -u ] -w" .br .B "/sbin/clock [ -u ] -s" .br .B "/sbin/clock [ -u ] -a" .SH DESCRIPTION .B clock 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. .SH OPTIONS .TP .B \-u Indicates that the CMOS clock is set to Universal Time. .TP .B \-r Read CMOS clock and print the result to stdout. .TP .B \-w Write the system time into the CMOS clock. .TP .B \-s Set the system time from the CMOS clock. .TP .B \-a Set the system time from the CMOS clock, adjusting the time to correct for systematic error, and writting it back into the CMOS clock. .sp This option uses the file .I /etc/adjtime to determine how the clock changes. It contains three numbers: .RS The first number is the correction in seconds per day (for example, if your clock runs 5 seconds fast each day, the first number should read -5.0). .LP The second number tells when .B clock was last used, in seconds since 1/1/1970. .LP The third number is the remaining part of a second that was left over after the last adjustment. .LP The following instructions are from the source code: .TP a) create a file .I /etc/adjtime containing as the first and only line: '0.0 0 0.0' .TP b) run .I "clock -au" or .IR "clock -a" , depending on whether your CMOS is in Universal or Local Time. This updates the second number. .TP c) set your system time using the .I date command. .TP d) update your CMOS time using .I "clock -wu" or .I clock -w .TP e) replace the first number in .I /etc/adjtime by your correction. .TP f) put the command .I "clock -au" or .I "clock -a" in your .IR /etc/rc.local , or let .BR cron (8) start it regularly. .RE .SH FILES .I /etc/adjtime .br .I /etc/rc.local .SH AUTHORS .TP .B V1.0 Charles Hedrick, hedrick@cs.rutgers.edu, Apr 1992 .TP .B V1.1 Modified for clock adjustments, Rob Hooft, hooft@chem.ruu.nl, Nov 1992 .TP .B V1.2 Patches by Harald Koenig, koenig@nova.tat.physik.uni-tuebingen.de, applied by Rob Hooft, hooft@EMBL-Heidelberg.DE, Oct 1993 .sp