<term><command>status</command></term>
<listitem><para>Show current settings of the system clock and
- RTC, including whether network time synchronization is
- on. Note that whether network time synchronization is on
- simply reflects whether the
- <filename>systemd-timesyncd.service</filename> unit is
- enabled. Even if this command shows the status as off, a
- different service might still synchronize the clock with the
- network.</para></listitem>
+ RTC, including whether network time synchronization through
+ <filename>systemd-timesyncd.service</filename> is active.
+ Even if is off, a different service might still synchronize the
+ clock with the network.</para></listitem>
</varlistentry>
<varlistentry>
<title>Examples</title>
<para>Show current settings:
<programlisting>$ timedatectl
- Local time: Di 2015-04-07 16:26:56 CEST
- Universal time: Di 2015-04-07 14:26:56 UTC
- RTC time: Di 2015-04-07 14:26:56
- Time zone: Europe/Berlin (CEST, +0200)
- Network time on: yes
-NTP synchronized: yes
- RTC in local TZ: no</programlisting>
+ Local time: Thu 2017-09-21 16:08:56 CEST
+ Universal time: Thu 2017-09-21 14:08:56 UTC
+ RTC time: Thu 2017-09-21 14:08:56
+ Time zone: Europe/Warsaw (CEST, +0200)
+ System clock synchronized: yes
+systemd-timesyncd.service active: yes
+ RTC in local TZ: no</programlisting>
</para>
<para>Enable network time synchronization:
if (have_time) {
xstrftime(a, "%a %Y-%m-%d %H:%M:%S %Z", localtime_r(&sec, &tm));
- printf(" Local time: %.*s\n", (int) sizeof(a), a);
+ printf(" Local time: %.*s\n", (int) sizeof(a), a);
xstrftime(a, "%a %Y-%m-%d %H:%M:%S UTC", gmtime_r(&sec, &tm));
- printf(" Universal time: %.*s\n", (int) sizeof(a), a);
+ printf(" Universal time: %.*s\n", (int) sizeof(a), a);
} else {
- printf(" Local time: %s\n", "n/a");
- printf(" Universal time: %s\n", "n/a");
+ printf(" Local time: %s\n", "n/a");
+ printf(" Universal time: %s\n", "n/a");
}
if (i->rtc_time > 0) {
rtc_sec = (time_t) (i->rtc_time / USEC_PER_SEC);
xstrftime(a, "%a %Y-%m-%d %H:%M:%S", gmtime_r(&rtc_sec, &tm));
- printf(" RTC time: %.*s\n", (int) sizeof(a), a);
+ printf(" RTC time: %.*s\n", (int) sizeof(a), a);
} else
- printf(" RTC time: %s\n", "n/a");
+ printf(" RTC time: %s\n", "n/a");
if (have_time)
xstrftime(a, "%Z, %z", localtime_r(&sec, &tm));
else
tzset();
- printf(" Time zone: %s (%.*s)\n"
- " Network time on: %s\n"
- "NTP synchronized: %s\n"
- " RTC in local TZ: %s\n",
+ printf(" Time zone: %s (%.*s)\n"
+ " System clock synchronized: %s\n"
+ "systemd-timesyncd.service active: %s\n"
+ " RTC in local TZ: %s\n",
strna(i->timezone), (int) sizeof(a), have_time ? a : "n/a",
i->ntp_capable ? yes_no(i->ntp_enabled) : "n/a",
yes_no(i->ntp_synced),