From: Zbigniew Jędrzejewski-Szmek Date: Thu, 21 Sep 2017 14:05:52 +0000 (+0200) Subject: timedatectl: be more explicit what "ntp synchronized" means X-Git-Tag: v235~71^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ec530a1890925efe347f739917dd4078c1b1942;p=platform%2Fupstream%2Fsystemd.git 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. --- diff --git a/man/timedatectl.xml b/man/timedatectl.xml index d8a83c8..0dacd05 100644 --- a/man/timedatectl.xml +++ b/man/timedatectl.xml @@ -104,13 +104,10 @@ status 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 - systemd-timesyncd.service unit is - enabled. Even if this command shows the status as off, a - different service might still synchronize the clock with the - network. + RTC, including whether network time synchronization through + systemd-timesyncd.service is active. + Even if is off, a different service might still synchronize the + clock with the network. @@ -206,13 +203,13 @@ Examples Show current settings: $ 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 + 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 Enable network time synchronization: diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c index 281b153..a30e783 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),