timedatectl: show both current actual timezone name and UTC distance in TImezone field

This commit is contained in:
Lennart Poettering 2012-11-23 16:33:39 +01:00
parent 2af32104c4
commit bd5ce8e9fc
1 changed files with 2 additions and 3 deletions

View File

@ -145,10 +145,9 @@ static void print_status_info(StatusInfo *i) {
}
zero(tm);
assert_se(strftime(a, sizeof(a), "%z", localtime_r(&sec, &tm)) > 0);
assert_se(strftime(a, sizeof(a), "%Z, %z", localtime_r(&sec, &tm)) > 0);
char_array_0(a);
printf(" Timezone: %s\n"
" UTC offset: %s\n"
printf(" Timezone: %s (%s)\n"
" NTP enabled: %s\n"
"NTP synchronized: %s\n"
" RTC in local TZ: %s\n",