timedatectl: be more explicit what "ntp synchronized" means

The documentation explained that the message doesn't really mean what it says,
but I think it's better to just make the message more straightforward.

Fixes #6554.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2017-09-21 16:05:52 +02:00
parent 70b089d7dc
commit 3ec530a189
2 changed files with 21 additions and 24 deletions

View file

@ -104,13 +104,10 @@
<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>
@ -206,13 +203,13 @@
<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:

View file

@ -103,13 +103,13 @@ static void print_status_info(const StatusInfo *i) {
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) {
@ -117,9 +117,9 @@ static void print_status_info(const StatusInfo *i) {
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));
@ -134,10 +134,10 @@ static void print_status_info(const StatusInfo *i) {
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),