3
.\" Author: Lennart Poettering <lennart@poettering.net>
4
.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
6
.\" Manual: timedatectl
10
.TH "TIMEDATECTL" "1" "" "systemd" "timedatectl"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
25
.\" disable justification (adjust text to left margin only)
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
31
timedatectl \- Control the system time and date
33
.HP \w'\fBtimedatectl\ \fR\fB[OPTIONS...]\fR\fB\ \fR\fB{COMMAND}\fR\ 'u
34
\fBtimedatectl \fR\fB[OPTIONS...]\fR\fB \fR\fB{COMMAND}\fR
38
may be used to query and change the system clock and its settings\&.
41
The following options are understood:
43
\fB\-h\fR, \fB\-\-help\fR
45
Prints a short help text and exits\&.
50
Prints a short version string and exits\&.
55
Do not pipe output into a pager\&.
58
\fB\-\-no\-ask\-password\fR
60
Don\*(Aqt query the user for authentication for privileged operations\&.
63
\fB\-H\fR, \fB\-\-host\fR
65
Execute the operation remotely\&. Specify a hostname, or username and hostname separated by @, to connect to\&. This will use SSH to talk to a remote system\&.
68
\fB\-\-adjust\-system\-clock\fR
72
is invoked and this option is passed the system clock is synchronized from the RTC again, taking the new setting into account\&. Otherwise the RTC is synchronized from the system clock\&.
75
The following commands are understood:
79
Show current settings of the system clock and RTC\&.
82
\fBset\-time [TIME]\fR
84
Set the system clock to the specified time\&. This will also update the RTC time accordingly\&. The time may be specified in the format "2012\-10\-30 18:17:16"\&.
87
\fBset\-timezone [TIMEZONE]\fR
89
Set the system time zone to the specified value\&. Available time zones can be listed with
90
\fBlist\-timezones\fR\&. If the RTC is configured to be in the local time this will also update the RTC time\&. This call will alter the
94
for more information\&.
99
List available time zones, one per line\&. Entries from the list can be set as the system time zone with
100
\fBset\-timezone\fR\&.
103
\fBset\-local\-rtc [BOOL]\fR
105
Takes a boolean argument\&. If
107
the system is configured to maintain the RTC in universal time, if
109
it will maintain the RTC in local time instead\&. Note that maintaining the RTC in the local time zone is not fully supported and will create various problems with time zone changes and daylight saving adjustments\&. If at all possible use RTC in UTC\&. Note that invoking this will also synchronize the RTC from the system clock, unless
110
\fB\-\-adjust\-system\-clock\fR
111
is passed (see above)\&. This command will change the 3rd line of
112
/etc/adjtime, as documented in
116
\fBset\-ntp [BOOL]\fR
118
Takes a boolean argument\&. Controls whether NTP based network time synchronization is enabled (if available)\&.
122
On success 0 is returned, a non\-zero failure code otherwise\&.
129
is not given; overrides
130
\fI$PAGER\fR\&. Setting this to an empty string or the value
132
is equivalent to passing
133
\fB\-\-no\-pager\fR\&.
137
Show current settings:
144
Local time: Fri, 2012\-11\-02 09:26:46 CET
145
Universal time: Fri, 2012\-11\-02 08:26:46 UTC
146
RTC time: Fri, 2012\-11\-02 08:26:45
147
Timezone: Europe/Warsaw
153
Last DST change: CEST → CET, DST became inactive
154
Sun, 2012\-10\-28 02:59:59 CEST
155
Sun, 2012\-10\-28 02:00:00 CET
156
Next DST change: CET → CEST, DST will become active
157
the clock will jump one hour forward
158
Sun, 2013\-03\-31 01:59:59 CET
159
Sun, 2013\-03\-31 03:00:00 CEST
166
Enable an NTP daemon (chronyd):
172
$ timedatectl set\-ntp true
173
==== AUTHENTICATING FOR org\&.freedesktop\&.timedate1\&.set\-ntp ===
174
Authentication is required to control whether network time synchronization shall be enabled\&.
175
Authenticating as: user
177
==== AUTHENTICATION COMPLETE ===
190
$ systemctl status chronyd\&.service
191
chronyd\&.service \- NTP client/server
192
Loaded: loaded (/usr/lib/systemd/system/chronyd\&.service; enabled)
193
Active: active (running) since Fri, 2012\-11\-02 09:36:25 CET; 5s ago
209
\fBsystemd-timedated.service\fR(8)