| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 | # SOME DESCRIPTIVE TITLE# Copyright (C) YEAR Free Software Foundation, Inc.# This file is distributed under the same license as the PACKAGE package.# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.##, fuzzymsgid ""msgstr """Project-Id-Version: PACKAGE VERSION\n""POT-Creation-Date: 2020-06-17 12:44+0800\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Language-Team: LANGUAGE <LL@li.org>\n""Language: \n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n"#. type: Content of: <sect1><title>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:11msgid "Configuring the system clock"msgstr ""#. type: Content of: <sect1><indexterm><primary>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:14msgid "clock"msgstr ""#. type: Content of: <sect1><indexterm><secondary>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:15msgid "configuring"msgstr ""#. type: Content of: <sect1><para>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:17msgid """This section discusses how to configure the ""<command>systemd-timedated</command> system service, which configures the ""system clock and timezone."msgstr ""#. type: Content of: <sect1><para>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:21msgid """If you cannot remember whether or not the hardware clock is set to UTC, find ""out by running the <userinput>hwclock --localtime --show</userinput> ""command. This will display what the current time is according to the ""hardware clock. If this time matches whatever your watch says, then the ""hardware clock is set to local time. If the output from ""<command>hwclock</command> is not local time, chances are it is set to UTC ""time. Verify this by adding or subtracting the proper amount of hours for ""the timezone to the time shown by <command>hwclock</command>. For example, ""if you are currently in the MST timezone, which is also known as GMT -0700, ""add seven hours to the local time."msgstr ""#. type: Content of: <sect1><para>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:32msgid """<command>systemd-timedated</command> reads ""<filename>/etc/adjtime</filename>, and depending on the contents of the ""file, sets the clock to either UTC or local time."msgstr ""#. type: Content of: <sect1><para>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:36msgid """Create the <filename>/etc/adjtime</filename> file with the following ""contents if your hardware clock is set to local time:"msgstr ""#. type: Content of: <sect1><screen>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:39#, no-wrapmsgid """<userinput>cat > /etc/adjtime << \"EOF\"\n""<literal>0.0 0 0.0\n""0\n""LOCAL</literal>\n""EOF</userinput>"msgstr ""#. type: Content of: <sect1><para>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:45msgid """If <filename>/etc/adjtime</filename> isn't present at first boot, ""<command>systemd-timedated</command> will assume that hardware clock is set ""to UTC and adjust the file according to that."msgstr ""#. type: Content of: <sect1><para>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:49msgid """You can also use the <command>timedatectl</command> utility to tell ""<command>systemd-timedated</command> if your hardware clock is set to UTC or ""local time:"msgstr ""#. type: Content of: <sect1><screen>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:53#, no-wrapmsgid "<userinput>timedatectl set-local-rtc 1</userinput>"msgstr ""#. type: Content of: <sect1><para>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:55msgid """<command>timedatectl</command> can also be used to change system time and ""time zone."msgstr ""#. type: Content of: <sect1><para>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:58msgid "To change your current system time, issue:"msgstr ""#. type: Content of: <sect1><screen>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:60#, no-wrapmsgid "<userinput>timedatectl set-time YYYY-MM-DD HH:MM:SS</userinput>"msgstr ""#. type: Content of: <sect1><para>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:62msgid "The hardware clock will also be updated accordingly."msgstr ""#. type: Content of: <sect1><para>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:64msgid "To change your current time zone, issue:"msgstr ""#. type: Content of: <sect1><screen>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:66#, no-wrapmsgid "<userinput>timedatectl set-timezone TIMEZONE</userinput>"msgstr ""#. type: Content of: <sect1><para>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:68msgid "You can get a list of available time zones by running:"msgstr ""#. type: Content of: <sect1><screen>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:70#, no-wrapmsgid "<userinput>timedatectl list-timezones</userinput>"msgstr ""#. type: Content of: <sect1><note><para>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:72msgid """Please note that the <command>timedatectl</command> command can be used only ""on a system booted with systemd."msgstr ""#. type: Content of: <sect1><sect2><title>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:76msgid "Network Time Synchronization"msgstr ""#. type: Content of: <sect1><sect2><para>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:78msgid """Starting with version 213, systemd ships a daemon called ""<command>systemd-timesyncd</command> which can be used to synchronize the ""system time with remote NTP servers."msgstr ""#. type: Content of: <sect1><sect2><para>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:82msgid """The daemon is not intended as a replacement for the well established NTP ""daemon, but as a client only implementation of the SNTP protocol which can ""be used for less advanced tasks and on resource limited systems."msgstr ""#. type: Content of: <sect1><sect2><para>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:87msgid """Starting with systemd version 216, the <command>systemd-timesyncd</command> ""daemon is enabled by default. If you want to disable it, issue the following ""command:"msgstr ""#. type: Content of: <sect1><sect2><screen>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:92#, no-wrapmsgid "<userinput>systemctl disable systemd-timesyncd</userinput>"msgstr ""#. type: Content of: <sect1><sect2><para>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:94msgid """The <filename>/etc/systemd/timesyncd.conf</filename> file can be used to ""change the NTP servers that <command>systemd-timesyncd</command> ""synchronizes with."msgstr ""#. type: Content of: <sect1><sect2><para>#: /home/xry111/svn-repos/LFS-BOOK/chapter09/clock.xml:98msgid """Please note that when system clock is set to Local Time, ""<command>systemd-timesyncd</command> won't update hardware clock."msgstr ""
 |