-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclock.sgml
77 lines (67 loc) · 2.78 KB
/
clock.sgml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!doctype linuxdoc system>
<manpage title="CLOCK" sectnum="8">
<sect1> NAME<p>
<bf>clock</bf> - manipulate the CMOS clock
<sect1> SYNOPSIS<p>
<bf>clock
<tt>[</tt><bf/-u/<tt>]
[</tt><bf/-rwsa/<tt>]
[</tt><bf/-v/<tt><bf/]/</tt>
</bf>
<sect1> DESCRIPTION<p>
<bf>clock</bf> 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.
<sect1> OPTIONS<p>
<descrip>
<tag/<bf/-u/</> indicates that the CMOS clock is set to universal time
<tag/<bf/-r/</> read CMOS clock and print the result to stdout
<tag/<bf/-w/</> write the system time into the CMOS clock
<tag/<bf/-s/</> set the system time from the CMOS clock
<tag/<bf/-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.
<tag/<bf/-v/</> print version number
</descrip>
The <bf/-a/ option uses the file <em>/etc/adjtime</em> to determine
how the clock changes. It contains three numbers:
<enum>
<item> the correction in seconds per day (for example, if your clock
runs 5 seconds fast each day, the first number should read -5.0),
<item> time when <bf>clock</bf> was last used, in seconds since 1/1/1970,
<item> the remaining part of a second that was left over after the
last adjustment.
</enum>
<p>
The following instructions are from the source code:
<enum> create a file <em>/etc/adjtime</em> containing as the first and
only line: '0.0 0 0.0',
<item> run <bf>clock -au</> or <bf>clock -a</>, depending on whether
your CMOS is in Universal or Local Time. This updates the second number,
<item> set your system time using the <bf>date</> command,
<item> update your CMOS time using <bf>clock -wu</> or <bf>clock -w</>,
<item> replace the first number in <em>/etc/adjtime</> by your
correction,
<item> put the command <bf>clock -au</> or <bf>clock -a</> in your
<em>/etc/rc.local</>, or let <bf>cron</> start it regularly.
</enum>
<sect1> FILES<p>
<em>/etc/adjtime</em>
<em>/etc/rc.local</em>
<sect1> AUTHORS<p>
<descrip>
<tag/<bf/V1.0/</> Charles Hedrick, [email protected], Apr 1992
<tag/<bf/V1.1/</> Modified for clock adjustments, Rob Hooft,
[email protected], Nov 1992
<tag/<bf/V1.2/</> Patches by Harald Koenig,
[email protected], applied by Rob Hooft,
[email protected], Oct 1993
<tag/<bf/V1.3/</> Changes from [email protected] (Alan Modra)
<tag/<bf/V1.4/</> Fix for years > 2000
[email protected] (Alan Modra),
and added <bf/-v/ option to print version [email protected], Feb 1995.
<tag/<bf/V1.4a/</> Converted to be compatible with the SPARC /dev/rtc driver
Tom Dyas ([email protected]), Aug 1996
<tag/<bf/V1.4b/</> Adapted for Power Macintosh by Paul Mackerras, Dec 1996
</descrip>
</manpage>