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

OPTIONS

19       The following options are understood:
20
21       --no-ask-password
22           Do not query the user for authentication for privileged operations.
23
24       --adjust-system-clock
25           If set-local-rtc is invoked and this option is passed, the system
26           clock is synchronized from the RTC again, taking the new setting
27           into account. Otherwise, the RTC is synchronized from the system
28           clock.
29
30       -H, --host=
31           Execute the operation remotely. Specify a hostname, or a username
32           and hostname separated by "@", to connect to. The hostname may
33           optionally be suffixed by a container name, separated by ":", which
34           connects directly to a specific container on the specified host.
35           This will use SSH to talk to the remote machine manager instance.
36           Container names may be enumerated with machinectl -H HOST.
37
38       -M, --machine=
39           Execute operation on a local container. Specify a container name to
40           connect to.
41
42       -h, --help
43           Print a short help text and exit.
44
45       --version
46           Print a short version string and exit.
47
48       --no-pager
49           Do not pipe output into a pager.
50
51       The following commands are understood:
52
53       status
54           Show current settings of the system clock and RTC.
55
56       set-time [TIME]
57           Set the system clock to the specified time. This will also update
58           the RTC time accordingly. The time may be specified in the format
59           "2012-10-30 18:17:16".
60
61       set-timezone [TIMEZONE]
62           Set the system time zone to the specified value. Available
63           timezones can be listed with list-timezones. If the RTC is
64           configured to be in the local time, this will also update the RTC
65           time. This call will alter the /etc/localtime symlink. See
66           localtime(5) for more information.
67
68       list-timezones
69           List available time zones, one per line. Entries from the list can
70           be set as the system timezone with set-timezone.
71
72       set-local-rtc [BOOL]
73           Takes a boolean argument. If "0", the system is configured to
74           maintain the RTC in universal time. If "1", it will maintain the
75           RTC in local time instead. Note that maintaining the RTC in the
76           local timezone is not fully supported and will create various
77           problems with time zone changes and daylight saving adjustments. If
78           at all possible, keep the RTC in UTC mode. Note that invoking this
79           will also synchronize the RTC from the system clock, unless
80           --adjust-system-clock is passed (see above). This command will
81           change the 3rd line of /etc/adjtime, as documented in hwclock(8).
82
83       set-ntp [BOOL]
84           Takes a boolean argument. Controls whether NTP based network time
85           synchronization is enabled (if available).
86

EXIT STATUS

88       On success, 0 is returned, a non-zero failure code otherwise.
89

ENVIRONMENT

91       $SYSTEMD_PAGER
92           Pager to use when --no-pager is not given; overrides $PAGER.
93           Setting this to an empty string or the value "cat" is equivalent to
94           passing --no-pager.
95
96       $SYSTEMD_LESS
97           Override the default options passed to less ("FRSXMK").
98

EXAMPLES

100       Show current settings:
101
102           $ timedatectl
103                 Local time: Fri, 2012-11-02 09:26:46 CET
104             Universal time: Fri, 2012-11-02 08:26:46 UTC
105             RTC time: Fri, 2012-11-02 08:26:45
106             Timezone: Europe/Warsaw
107                 UTC offset: +0100
108                NTP enabled: no
109           NTP synchronized: no
110            RTC in local TZ: no
111                 DST active: no
112            Last DST change: CEST → CET, DST became inactive
113                 Sun, 2012-10-28 02:59:59 CEST
114                 Sun, 2012-10-28 02:00:00 CET
115            Next DST change: CET → CEST, DST will become active
116                 the clock will jump one hour forward
117                 Sun, 2013-03-31 01:59:59 CET
118                 Sun, 2013-03-31 03:00:00 CEST
119
120       Enable an NTP daemon (chronyd):
121
122           $ timedatectl set-ntp true
123           ==== AUTHENTICATING FOR org.freedesktop.timedate1.set-ntp ===
124           Authentication is required to control whether network time synchronization shall be enabled.
125           Authenticating as: user
126           Password: ********
127           ==== AUTHENTICATION COMPLETE ===
128
129           $ systemctl status chronyd.service
130           chronyd.service - NTP client/server
131               Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled)
132               Active: active (running) since Fri, 2012-11-02 09:36:25 CET; 5s ago
133           ...
134
135

SEE ALSO

137       systemd(1), hwclock(8), date(1), localtime(5), systemctl(1), systemd-
138       timedated.service(8), systemd-firstboot(1)
139
140
141
142systemd 219                                                     TIMEDATECTL(1)
Impressum