2 % This is part of CLFSja package.
4 % This is a CTIE change file for the original XML source of the CLFSbook.
7 <?xml version="1.0" encoding="ISO-8859-1"?>
9 <?xml version="1.0" encoding="UTF-8"?>
13 <title>Configuring the setclock Script</title>
15 <title>setclock スクリプトの設定</title>
19 <secondary>configuring</secondary></indexterm>
21 <secondary>設定</secondary></indexterm>
25 <para os="a">The <command>setclock</command> script reads the time from the
26 hardware clock, also known as the BIOS or the Complementary Metal Oxide
27 Semiconductor (CMOS) clock. If the hardware clock is set to UTC, this
28 script will convert the hardware clock's time to the local time using
29 the <filename>/etc/localtime</filename> file (which tells the
30 <command>hwclock</command> program which timezone the user is in). There
31 is no way to detect whether or not the hardware clock is set to UTC, so
32 this needs to be configured manually.</para>
35 <command>setclock</command> スクリプトはハードウェアクロックから時刻を読み取ります。
36 ハードウェアクロックは BIOS クロック、あるいは CMOS (Complementary Metal Oxide Semiconductor) クロックとしても知られているものです。
37 ハードウェアクロックが UTC に設定されていると <command>setclock</command> スクリプトは <filename>/etc/localtime</filename> ファイルを参照して、ハードウェアクロックの示す時刻をローカル時刻に変換します。
38 <filename>/etc/localtime</filename> ファイルは <command>hwclock</command> プログラムに対して、ユーザーがどのタイムゾーンに位置するかを伝えます。
39 ハードウェアクロックが UTC に設定されているかどうかを知る方法はないので、手動で設定を行う必要があります。
44 <para os="b">If you cannot remember whether or not the hardware clock is set
45 to UTC, find out by running the <userinput>hwclock --localtime
46 --show</userinput> command. This will display what the current time is
47 according to the hardware clock. If this time matches whatever your
48 watch says, then the hardware clock is set to local time. If the output
49 from <command>hwclock</command> is not local time, chances are it is set
50 to UTC time. Verify this by adding or subtracting the proper amount of
51 hours for the timezone to the time shown by <command>hwclock</command>.
52 For example, if you are currently in the MST timezone, which is also
53 known as GMT -0700, add seven hours to the local time.</para>
56 ハードウェアクロックが UTC に設定されているかどうか忘れた場合は <userinput>hwclock --localtime --show</userinput> を実行すれば確認できます。
57 このコマンドにより、ハードウェアクロックに基づいた現在時刻が表示されます。
58 その時刻が手元の時計と同じ時刻であれば、ローカル時刻として設定されているわけです。
59 一方それがローカル時刻でなかった場合は、おそらくは UTC に設定されているからでしょう。
60 <command>hwclock</command> によって示された時刻からタイムゾーンに応じた一定時間を加減してみてください。
61 例えばタイムゾーンが MST であった場合、これは GMT -0700 なので、7時間を加えればローカル時刻となります。
66 <para os="c">Change the value of the <envar>UTC</envar> variable below
67 to a value of <option>0</option> (zero) if the hardware clock
68 is <emphasis>not</emphasis> set to UTC time.</para>
71 ハードウェアクロックが UTC 時刻として設定<emphasis>されていない</emphasis>場合は、以下に示す変数 <envar>UTC</envar> の値を <parameter>0</parameter> (ゼロ) にしてください。
76 <para os="d">Create a new file <filename>/etc/sysconfig/clock</filename> by running
80 以下のコマンドを実行して <filename>/etc/sysconfig/clock</filename> ファイルを新規に作成します。
85 <para os="e">A good hint explaining how to deal with time on CLFS is available
86 at <ulink url="&hints-root;time.txt"/>. It explains issues such as
87 time zones, UTC, and the <envar>TZ</envar> environment variable.</para>
90 CLFS において時刻の取り扱い方を示した分かりやすいヒントが <ulink url="&hints-root;time.txt"/> にあります。
91 そこではタイムゾーン、UTC、環境変数 <envar>TZ</envar> などについて説明しています。