timedatectl: be more explicit what "ntp synchronized" means
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 21 Sep 2017 14:05:52 +0000 (16:05 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 21 Sep 2017 14:16:45 +0000 (16:16 +0200)
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.

man/timedatectl.xml
src/timedate/timedatectl.c

index d8a83c8..0dacd05 100644 (file)
         <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:
index 281b153..a30e783 100644 (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),