diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-09-21 16:05:52 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-09-21 16:16:45 +0200 |
commit | 3ec530a1890925efe347f739917dd4078c1b1942 (patch) | |
tree | d1303b09bef59df0c0a0320fc00141954778d072 | |
parent | 70b089d7dcd8fa22c86b9852417244701a4523d0 (diff) | |
download | systemd-3ec530a1890925efe347f739917dd4078c1b1942.tar.gz |
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.
-rw-r--r-- | man/timedatectl.xml | 25 | ||||
-rw-r--r-- | src/timedate/timedatectl.c | 20 |
2 files changed, 21 insertions, 24 deletions
diff --git a/man/timedatectl.xml b/man/timedatectl.xml index d8a83c8add..0dacd05958 100644 --- a/man/timedatectl.xml +++ b/man/timedatectl.xml @@ -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: diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c index 281b1534a3..a30e783c09 100644 --- a/src/timedate/timedatectl.c +++ b/src/timedate/timedatectl.c @@ -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), |