~ubuntu-branches/ubuntu/trusty/systemd/trusty

« back to all changes in this revision

Viewing changes to man/timedatectl.1

Tags: upstream-202
Import upstream version 202

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
'\" t
2
 
.\"     Title: timedatectl
3
 
.\"    Author: Lennart Poettering <lennart@poettering.net>
4
 
.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
5
 
.\"      Date: 03/07/2013
6
 
.\"    Manual: timedatectl
7
 
.\"    Source: systemd
8
 
.\"  Language: English
9
 
.\"
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
 
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
 
.ie \n(.g .ds Aq \(aq
19
 
.el       .ds Aq '
20
 
.\" -----------------------------------------------------------------
21
 
.\" * set default formatting
22
 
.\" -----------------------------------------------------------------
23
 
.\" disable hyphenation
24
 
.nh
25
 
.\" disable justification (adjust text to left margin only)
26
 
.ad l
27
 
.\" -----------------------------------------------------------------
28
 
.\" * MAIN CONTENT STARTS HERE *
29
 
.\" -----------------------------------------------------------------
30
 
.SH "NAME"
31
 
timedatectl \- Control the system time and date
32
 
.SH "SYNOPSIS"
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
35
 
.SH "DESCRIPTION"
36
 
.PP
37
 
\fBtimedatectl\fR
38
 
may be used to query and change the system clock and its settings\&.
39
 
.SH "OPTIONS"
40
 
.PP
41
 
The following options are understood:
42
 
.PP
43
 
\fB\-h\fR, \fB\-\-help\fR
44
 
.RS 4
45
 
Prints a short help text and exits\&.
46
 
.RE
47
 
.PP
48
 
\fB\-\-version\fR
49
 
.RS 4
50
 
Prints a short version string and exits\&.
51
 
.RE
52
 
.PP
53
 
\fB\-\-no\-pager\fR
54
 
.RS 4
55
 
Do not pipe output into a pager\&.
56
 
.RE
57
 
.PP
58
 
\fB\-\-no\-ask\-password\fR
59
 
.RS 4
60
 
Don\*(Aqt query the user for authentication for privileged operations\&.
61
 
.RE
62
 
.PP
63
 
\fB\-H\fR, \fB\-\-host\fR
64
 
.RS 4
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\&.
66
 
.RE
67
 
.PP
68
 
\fB\-\-adjust\-system\-clock\fR
69
 
.RS 4
70
 
If
71
 
\fBset\-local\-rtc\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\&.
73
 
.RE
74
 
.PP
75
 
The following commands are understood:
76
 
.PP
77
 
\fBstatus\fR
78
 
.RS 4
79
 
Show current settings of the system clock and RTC\&.
80
 
.RE
81
 
.PP
82
 
\fBset\-time [TIME]\fR
83
 
.RS 4
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"\&.
85
 
.RE
86
 
.PP
87
 
\fBset\-timezone [TIMEZONE]\fR
88
 
.RS 4
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
91
 
/etc/localtime
92
 
symlink\&. See
93
 
\fBlocaltime\fR(5)
94
 
for more information\&.
95
 
.RE
96
 
.PP
97
 
\fBlist\-timezones\fR
98
 
.RS 4
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\&.
101
 
.RE
102
 
.PP
103
 
\fBset\-local\-rtc [BOOL]\fR
104
 
.RS 4
105
 
Takes a boolean argument\&. If
106
 
0
107
 
the system is configured to maintain the RTC in universal time, if
108
 
1
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
113
 
\fBhwclock\fR(8)\&.
114
 
.RE
115
 
.PP
116
 
\fBset\-ntp [BOOL]\fR
117
 
.RS 4
118
 
Takes a boolean argument\&. Controls whether NTP based network time synchronization is enabled (if available)\&.
119
 
.RE
120
 
.SH "EXIT STATUS"
121
 
.PP
122
 
On success 0 is returned, a non\-zero failure code otherwise\&.
123
 
.SH "ENVIRONMENT"
124
 
.PP
125
 
\fI$SYSTEMD_PAGER\fR
126
 
.RS 4
127
 
Pager to use when
128
 
\fB\-\-no\-pager\fR
129
 
is not given; overrides
130
 
\fI$PAGER\fR\&. Setting this to an empty string or the value
131
 
cat
132
 
is equivalent to passing
133
 
\fB\-\-no\-pager\fR\&.
134
 
.RE
135
 
.SH "EXAMPLES"
136
 
.PP
137
 
Show current settings:
138
 
.sp
139
 
.if n \{\
140
 
.RS 4
141
 
.\}
142
 
.nf
143
 
$ timedatectl
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
148
 
      UTC offset: +0100
149
 
     NTP enabled: no
150
 
NTP synchronized: no
151
 
 RTC in local TZ: no
152
 
      DST active: no
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
160
 
                
161
 
.fi
162
 
.if n \{\
163
 
.RE
164
 
.\}
165
 
.PP
166
 
Enable an NTP daemon (chronyd):
167
 
.sp
168
 
.if n \{\
169
 
.RS 4
170
 
.\}
171
 
.nf
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
176
 
Password: ********
177
 
==== AUTHENTICATION COMPLETE ===
178
 
                
179
 
.fi
180
 
.if n \{\
181
 
.RE
182
 
.\}
183
 
.sp
184
 
 
185
 
.sp
186
 
.if n \{\
187
 
.RS 4
188
 
.\}
189
 
.nf
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
194
 
\&.\&.\&.
195
 
                
196
 
.fi
197
 
.if n \{\
198
 
.RE
199
 
.\}
200
 
.sp
201
 
.SH "SEE ALSO"
202
 
.PP
203
 
 
204
 
\fBsystemd\fR(1),
205
 
\fBhwclock\fR(8),
206
 
\fBdate\fR(1),
207
 
\fBlocaltime\fR(5),
208
 
\fBsystemctl\fR(1),
209
 
\fBsystemd-timedated.service\fR(8)