source: BOOK/bootscripts/common/clock.xml@ 0060a51

clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 0060a51 was e0508f3c, checked in by William Harrington <kb0iic@…>, 11 years ago

Add clock configuration section.

  • Property mode set to 100644
File size: 2.6 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-scripts-clock">
9 <?dbhtml filename="clock.html"?>
10
11 <title>Configuring the system clock</title>
12
13 <indexterm zone="ch-scripts-clock">
14 <primary sortas="d-clock">clock</primary>
15 <secondary>configuring</secondary></indexterm>
16
17 <para>This section discusses how to configure the
18 <command>systemd-timedated</command> system service, which configures
19 system clock and timezone.</para>
20
21 <para>Systemd provides a <command>timedatectl</command> utility which is
22 used to communicate with <command>systemd-timedated</command>. It can be used
23 to set the system clock in local time or UTC time, depending on the hardware
24 clock setting. By default, <command>systemd-timedated</command> will assume
25 that clock is set to UTC time.</para>
26
27 <para>If you cannot remember whether or not the hardware clock is set to UTC,
28 find out by running the <userinput>hwclock --localtime --show</userinput>
29 command. This will display what the current time is according to the hardware
30 clock. If this time matches whatever your watch says, then the hardware clock is
31 set to local time. If the output from <command>hwclock</command> is not local
32 time, chances are it is set to UTC time. Verify this by adding or subtracting
33 the proper amount of hours for the timezone to the time shown by
34 <command>hwclock</command>. For example, if you are currently in the MST
35 timezone, which is also known as GMT -0700, add seven hours to the local
36 time.</para>
37
38 <para>If your clock is set to local time, tell <command>systemd-timedated</command>
39 about it by running the following command:</para>
40
41<screen role="nodump"><userinput>timedatectl set-local-rtc 1</userinput></screen>
42
43 <para><command>timedatectl</command> can also be used to change system time and
44 time zone.</para>
45
46 <para>To change your current system time, issue:</para>
47
48<screen role="nodump"><userinput>timedatectl set-time YYYY:MM:DD HH:MM:SS</userinput></screen>
49
50 <para>Hardware clock will also be updated accordingly.</para>
51
52 <para>To change your current time zone, issue:</para>
53
54<screen role="nodump"><userinput>timedatectl set-timezone TIMEZONE</userinput></screen>
55
56 <para>You can get list of available time zones by running:</para>
57
58<screen role="nodump"><userinput>timedatectl list-timezones</userinput></screen>
59
60 <note><para>Please note that <command>timedatectl</command> command can
61 be used only on a system booted with Systemd.</para></note>
62
63</sect1>
Note: See TracBrowser for help on using the repository browser.