mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-20 05:57:43 +00:00
8d18f3d4a9
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1442 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
39 lines
1.4 KiB
XML
39 lines
1.4 KiB
XML
<sect1 id="ch07-setclock">
|
|
<title>Configuring the setclock script</title>
|
|
<?dbhtml filename="setclock.html" dir="chapter07"?>
|
|
|
|
|
|
<para>The setclock script is only for real use when the hardware clock (also
|
|
known as BIOS or CMOS clock) isn't set to GMT time. The recommended
|
|
setup is setting the hardware clock to GMT and having the time converted
|
|
to localtime using the /etc/localtime symbolic link. But if an
|
|
OS is run that doesn't understand a clock set to GMT (most notable are
|
|
Microsoft OS'es) you may want to set the clock to localtime so that
|
|
the time is properly displayed on those OS'es. This script will then
|
|
set the kernel time to the hardware clock without converting the time using
|
|
the /etc/localtime symlink.</para>
|
|
|
|
<para>If you want to use this script on your system even if the
|
|
hardware clock is set to GMT, then the UTC variable below has to be
|
|
changed to the value of <emphasis>1</emphasis>.</para>
|
|
|
|
<para>Create a new file <filename>/etc/sysconfig/clock</filename> by running
|
|
the following:</para>
|
|
|
|
<para><screen><userinput>cat > /etc/sysconfig/clock << "EOF"</userinput>
|
|
# Begin /etc/sysconfig/clock
|
|
|
|
UTC=0
|
|
|
|
# End /etc/sysconfig/clock
|
|
<userinput>EOF</userinput></screen></para>
|
|
|
|
<para>Now, you may want to take a look at a very good hint explaining how we
|
|
deal with time on LFS at <ulink
|
|
url="&hints-root;time.txt">&hints-root;time.txt</ulink>.
|
|
It explains issues such as timezones, UTC, and the TZ environment
|
|
variable.</para>
|
|
|
|
</sect1>
|
|
|