old-www/HOWTO/Clock-1.html

121 lines
5.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>The Clock Mini-HOWTO: Introduction</TITLE>
<LINK HREF="Clock-2.html" REL=next>
<LINK HREF="Clock.html#toc1" REL=contents>
</HEAD>
<BODY>
<A HREF="Clock-2.html">Next</A>
Previous
<A HREF="Clock.html#toc1">Contents</A>
<HR>
<H2><A NAME="s1">1. Introduction</A></H2>
<H2><A NAME="ss1.1">1.1 Does Anybody Really Know What Time It Is?</A>
</H2>
<P>The Real-Time-Clock (RTC) chips used on PC motherboards are
notoriously inaccurate, usually gaining or losing the same
amount of time each day. Linux provides a simple way to correct
for this in software, which can make the clock <EM>*very*</EM>
accurate, even without an external time source. But most people
don't know how to set it up, for several reasons:
<P>
<UL>
<LI>It's not mentioned in most of the general documentation
on how to set up linux, and it can't be set up
automatically (unless you have an external time source),
so the default is not to use it.</LI>
<LI>If you type &quot;<CODE>man clock</CODE>&quot; you may get
the man page for <CODE>clock(3)</CODE>, which is not what you
want. Try &quot;<CODE>man 8 clock</CODE>&quot; or
&quot;<CODE>man 8 hwclock</CODE>&quot; (some distributions
search the man pages in numerical order if you don't give
a section number, others search in the order specified in
<CODE>/etc/man.config</CODE>).</LI>
<LI>Most people don't seem to care what time it is anyway.</LI>
<LI>Those few who do care often want to sync the system clock
to an external time source, such as a network time server
or radio clock. This makes the accuracy of the RTC
(mostly) irrelevant.</LI>
</UL>
<P>This mini-HOWTO describes the low-tech approach (which can be
very accurate by itself), and provides pointers to several more
sophisticated options. In most cases the documentation is well
written, so I'm not going to repeat that information here.
<P>Previous versions included detailed instructions for the old
<CODE>clock(8)</CODE> program for anyone still running an older
system, but I've dropped that section because most distributions
now use <CODE>hwclock(8)</CODE> instead, which has much better
documentation. If you still want a copy of the <CODE>clock(8)</CODE>
instructions I can email them to you, but read the section on
<CODE>hwclock(8)</CODE> first.
<P>
<DL>
<DT><B>Note</B><DD><P>You must be logged in as &quot;<B>root</B>&quot; to run
any program that affects the RTC or the system time, which
includes most of the programs described here. If you
normally use a graphical interface for everything, you may
also need to learn some basic unix shell commands.
</DL>
<P>
<DL>
<DT><B>Note</B><DD><P>If you run more than one OS on your machine, you should
only let one of them set the RTC, so they don't
confuse each other. The exception is the twice-a-year
adjustment for Daylight Saving(s) Time (see the section on
DST for details).
</DL>
<P>If you run a dual-boot system that spends a lot of time running
Windows, you may want to check out some of the clock software
available for that OS instead. Follow the links on the NTP
website at
<A HREF="http://www.eecis.udel.edu/~ntp/software.html">http://www.eecis.udel.edu/~ntp/software.html</A>.
Many of the radio clocks mentioned here include software for Windows.
<H2><A NAME="ss1.2">1.2 Where to Find Stuff: &quot;The Usual Places&quot;</A>
</H2>
<P>In some places I've mentioned that software can be downloaded
from &quot;the usual places&quot;, which means any place you
could download a complete Linux system if you didn't get it on a
CD-ROM. In the old days that meant the ftp archive at
sunsite.unc.edu, and various mirror sites around the world. That
site has been renamed
<A HREF="http://metalab.unc.edu/linux/">http://metalab.unc.edu/linux/</A>
(since Sun no longer sponsors it). Some distributions also have
their own websites, which may include a lot of this stuff.
<P>I assume most people get Linux on CD these days, and those CDs
often include software that is not part of the default
installation, so you may already have some of the programs
mentioned here without knowing it.
<P>The latest version of this mini-HOWTO can be found at the home of
the Linux Documentation Project, which is currently
<A HREF="http://www.linuxdoc.org/">http://www.linuxdoc.org/</A> (and is also reachable from
the metalab site mentioned above). I think all the old links are
now forwarded to this one.
<P>All HOWTOs are written in SGML and converted to various other
formats by standardized conversion programs. Most people seem to
want the HTML version, which is at
<A HREF="http://www.linuxdoc.org/HOWTO/mini/Clock.html">http://www.linuxdoc.org/HOWTO/mini/Clock.html</A>.
Revision history can be found as comments in the SGML source.
Most Linux distributions install a complete set of HOWTO's in
<CODE>/usr/doc/HOWTO/</CODE> and
<CODE>/usr/doc/HOWTO/mini</CODE>.
<H2><A NAME="ss1.3">1.3 Acknowledgements</A>
</H2>
<P>This mini-HOWTO has been greatly improved thanks to various
people who have sent me email since the first version in 1996.
In some cases they wrote with questions but ended up giving me as
much information as I gave them. Unfortunately I haven't compiled
a list of names (maybe next time). You know who you are <CODE>:-)</CODE>.
<HR>
<A HREF="Clock-2.html">Next</A>
Previous
<A HREF="Clock.html#toc1">Contents</A>
</BODY>
</HTML>