1TIMEDATECTL(1)                    timedatectl                   TIMEDATECTL(1)
2
3
4

NAME

6       timedatectl - Control the system time and date
7

SYNOPSIS

9       timedatectl [OPTIONS...] {COMMAND}
10

DESCRIPTION

12       timedatectl may be used to query and change the system clock and its
13       settings.
14
15       Use systemd-firstboot(1) to initialize the system time zone for mounted
16       (but not booted) system images.
17
18       timedatectl may be used to show the current status of systemd-
19       timesyncd.service(8).
20

OPTIONS

22       The following options are understood:
23
24       --no-ask-password
25           Do not query the user for authentication for privileged operations.
26
27       --adjust-system-clock
28           If set-local-rtc is invoked and this option is passed, the system
29           clock is synchronized from the RTC again, taking the new setting
30           into account. Otherwise, the RTC is synchronized from the system
31           clock.
32
33       --monitor
34           If timesync-status is invoked and this option is passed, then
35           timedatectl monitors the status of systemd-timesyncd.service(8) and
36           updates the outputs. Use Ctrl+C to terminate the monitoring.
37
38       -a, --all
39           When showing properties of systemd-timesyncd.service(8), show all
40           properties regardless of whether they are set or not.
41
42       -p, --property=
43           When showing properties of systemd-timesyncd.service(8), limit
44           display to certain properties as specified as argument. If not
45           specified, all set properties are shown. The argument should be a
46           property name, such as "ServerName". If specified more than once,
47           all properties with the specified names are shown.
48
49       --value
50           When printing properties with show-timesync, only print the value,
51           and skip the property name and "=".
52
53       -H, --host=
54           Execute the operation remotely. Specify a hostname, or a username
55           and hostname separated by "@", to connect to. The hostname may
56           optionally be suffixed by a port ssh is listening on, seperated by
57           ":", and then a container name, separated by "/", which connects
58           directly to a specific container on the specified host. This will
59           use SSH to talk to the remote machine manager instance. Container
60           names may be enumerated with machinectl -H HOST. Put IPv6 addresses
61           in brackets.
62
63       -M, --machine=
64           Execute operation on a local container. Specify a container name to
65           connect to.
66
67       -h, --help
68           Print a short help text and exit.
69
70       --version
71           Print a short version string and exit.
72
73       --no-pager
74           Do not pipe output into a pager.
75

COMMANDS

77       The following commands are understood:
78
79       status
80           Show current settings of the system clock and RTC, including
81           whether network time synchronization through
82           systemd-timesyncd.service is active. Even if it is inactive, a
83           different service might still synchronize the clock. If no command
84           is specified, this is the implied default.
85
86       show
87           Show the same information as status, but in machine readable form.
88           This command is intended to be used whenever computer-parsable
89           output is required. Use status if you are looking for formatted
90           human-readable output.
91
92           By default, empty properties are suppressed. Use --all to show
93           those too. To select specific properties to show, use --property=.
94
95       set-time [TIME]
96           Set the system clock to the specified time. This will also update
97           the RTC time accordingly. The time may be specified in the format
98           "2012-10-30 18:17:16".
99
100       set-timezone [TIMEZONE]
101           Set the system time zone to the specified value. Available
102           timezones can be listed with list-timezones. If the RTC is
103           configured to be in the local time, this will also update the RTC
104           time. This call will alter the /etc/localtime symlink. See
105           localtime(5) for more information.
106
107       list-timezones
108           List available time zones, one per line. Entries from the list can
109           be set as the system timezone with set-timezone.
110
111       set-local-rtc [BOOL]
112           Takes a boolean argument. If "0", the system is configured to
113           maintain the RTC in universal time. If "1", it will maintain the
114           RTC in local time instead. Note that maintaining the RTC in the
115           local timezone is not fully supported and will create various
116           problems with time zone changes and daylight saving adjustments. If
117           at all possible, keep the RTC in UTC mode. Note that invoking this
118           will also synchronize the RTC from the system clock, unless
119           --adjust-system-clock is passed (see above). This command will
120           change the 3rd line of /etc/adjtime, as documented in hwclock(8).
121
122       set-ntp [BOOL]
123           Takes a boolean argument. Controls whether network time
124           synchronization is active and enabled (if available). If the
125           argument is true, this enables and starts the first existed service
126           listed in the environment variable $SYSTEMD_TIMEDATED_NTP_SERVICES
127           of systemd-timedated.service. If the argument is false, then this
128           disables and stops the all services listed in
129           $SYSTEMD_TIMEDATED_NTP_SERVICES.
130
131   systemd-timesyncd Commands
132       The following commands are specific to systemd-timesyncd.service(8).
133
134       timesync-status
135           Show current status of systemd-timesyncd.service(8). If --monitor
136           is specified, then this will monitor the status updates.
137
138       show-timesync
139           Show the same information as timesync-status, but in machine
140           readable form. This command is intended to be used whenever
141           computer-parsable output is required. Use timesync-status if you
142           are looking for formatted human-readable output.
143
144           By default, empty properties are suppressed. Use --all to show
145           those too. To select specific properties to show, use --property=.
146

EXIT STATUS

148       On success, 0 is returned, a non-zero failure code otherwise.
149

ENVIRONMENT

151       $SYSTEMD_PAGER
152           Pager to use when --no-pager is not given; overrides $PAGER. If
153           neither $SYSTEMD_PAGER nor $PAGER are set, a set of well-known
154           pager implementations are tried in turn, including less(1) and
155           more(1), until one is found. If no pager implementation is
156           discovered no pager is invoked. Setting this environment variable
157           to an empty string or the value "cat" is equivalent to passing
158           --no-pager.
159
160       $SYSTEMD_LESS
161           Override the options passed to less (by default "FRSXMK").
162
163           If the value of $SYSTEMD_LESS does not include "K", and the pager
164           that is invoked is less, Ctrl+C will be ignored by the executable.
165           This allows less to handle Ctrl+C itself.
166
167       $SYSTEMD_LESSCHARSET
168           Override the charset passed to less (by default "utf-8", if the
169           invoking terminal is determined to be UTF-8 compatible).
170

EXAMPLES

172       Show current settings:
173
174           $ timedatectl
175                          Local time: Thu 2017-09-21 16:08:56 CEST
176                      Universal time: Thu 2017-09-21 14:08:56 UTC
177                            RTC time: Thu 2017-09-21 14:08:56
178                           Time zone: Europe/Warsaw (CEST, +0200)
179           System clock synchronized: yes
180                         NTP service: active
181                     RTC in local TZ: no
182
183       Enable network time synchronization:
184
185           $ timedatectl set-ntp true
186           ==== AUTHENTICATING FOR org.freedesktop.timedate1.set-ntp ===
187           Authentication is required to control whether network time synchronization shall be enabled.
188           Authenticating as: user
189           Password: ********
190           ==== AUTHENTICATION COMPLETE ===
191
192
193
194           $ systemctl status systemd-timesyncd.service
195           ● systemd-timesyncd.service - Network Time Synchronization
196              Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled)
197              Active: active (running) since Mo 2015-03-30 14:20:38 CEST; 5s ago
198                Docs: man:systemd-timesyncd.service(8)
199            Main PID: 595 (systemd-timesyn)
200              Status: "Using Time Server 216.239.38.15:123 (time4.google.com)."
201              CGroup: /system.slice/systemd-timesyncd.service
202                      └─595 /usr/lib/systemd/systemd-timesyncd
203           ...
204
205       Show current status of systemd-timesyncd.service(8):
206
207           $ timedatectl timesync-status
208                  Server: 216.239.38.15 (time4.google.com)
209           Poll interval: 1min 4s (min: 32s; max 34min 8s)
210                    Leap: normal
211                 Version: 4
212                 Stratum: 1
213               Reference: GPS
214               Precision: 1us (-20)
215           Root distance: 335us (max: 5s)
216                  Offset: +316us
217                   Delay: 349us
218                  Jitter: 0
219            Packet count: 1
220               Frequency: -8.802ppm
221
222

SEE ALSO

224       systemd(1), hwclock(8), date(1), localtime(5), systemctl(1), systemd-
225       timedated.service(8), systemd-timesyncd.service(8), systemd-
226       firstboot(1)
227
228
229
230systemd 241                                                     TIMEDATECTL(1)
Impressum