[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[a811dff0] | 2 | <!DOCTYPE section [
|
---|
[673b0d8] | 3 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 4 | %general-entities;
|
---|
| 5 | ]>
|
---|
[a811dff0] | 6 | <section xmlns="http://docbook.org/docbook-ng"
|
---|
| 7 | xmlns:xlink="http://www.w3.org/1999/xlink"
|
---|
| 8 | xml:id="ch-scripts-setclock">
|
---|
| 9 | <info><title>Configuring the setclock script</title></info>
|
---|
[673b0d8] | 10 | <?dbhtml filename="setclock.html"?>
|
---|
[e12115e] | 11 |
|
---|
[673b0d8] | 12 | <indexterm zone="ch-scripts-setclock">
|
---|
| 13 | <primary sortas="d-setclock">setclock</primary>
|
---|
| 14 | <secondary>configuring</secondary></indexterm>
|
---|
| 15 |
|
---|
[f67f5cf] | 16 | <para>This <command>setclock</command> script reads the time from your hardware clock, also
|
---|
[673b0d8] | 17 | known as BIOS or CMOS (Complementry Metal-Oxide Semiconductor) clock, and either converts that time to localtime
|
---|
[56cc653] | 18 | using the <filename>/etc/localtime</filename> file (if the hardware clock
|
---|
| 19 | is set to GMT) or not (if the hardware clock is already set to localtime).
|
---|
| 20 | There is no way to auto-detect whether the hardware clock is set to GMT or
|
---|
| 21 | not, so we need to configure that here ourselves.</para>
|
---|
[6370fa6] | 22 |
|
---|
[56cc653] | 23 | <para>Change the value of the <emphasis>UTC</emphasis> variable below to a
|
---|
[f67f5cf] | 24 | <parameter>0</parameter> (zero) if your hardware clock is not set to GMT
|
---|
[56cc653] | 25 | time.</para>
|
---|
[fa914e5] | 26 |
|
---|
[b822811] | 27 | <para>Create a new file <filename>/etc/sysconfig/clock</filename> by running
|
---|
| 28 | the following:</para>
|
---|
[6370fa6] | 29 |
|
---|
[f67f5cf] | 30 | <screen><userinput>cat > /etc/sysconfig/clock << "EOF"
|
---|
[6370fa6] | 31 | # Begin /etc/sysconfig/clock
|
---|
| 32 |
|
---|
[56cc653] | 33 | UTC=1
|
---|
[6370fa6] | 34 |
|
---|
| 35 | # End /etc/sysconfig/clock
|
---|
[f67f5cf] | 36 | EOF</userinput></screen>
|
---|
[6370fa6] | 37 |
|
---|
[b822811] | 38 | <para>Now, you may want to take a look at a very good hint explaining how we
|
---|
[a811dff0] | 39 | deal with time on LFS at <uri xlink:href="&hints-root;time.txt"/>.
|
---|
[91b45ad] | 40 | It explains issues such as time zones, UTC, and the TZ environment
|
---|
[8d18f3d] | 41 | variable.</para>
|
---|
[6370fa6] | 42 |
|
---|
[a811dff0] | 43 | </section>
|
---|