diff options
author | Jan Synacek <jsynacek@redhat.com> | 2014-10-03 09:51:33 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-10-03 08:38:01 -0400 |
commit | a62e83b48cda6a709a796a361abaf6b129650b3c (patch) | |
tree | 613269e0802988dddba1d8dabf0e27fd995473b3 /src/journal | |
parent | 1c92ff85b786c423f4436ec26007e79369c9ac05 (diff) |
journalctl: make --utc work everywhere
The --utc option was introduced by commit
9fd290443f5f99fca0dcd4216b1de70f7d3b8db1.
Howerver, the implementation was incomplete.
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/journalctl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 395f85c9ae..816934ee6b 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -890,8 +890,8 @@ static int list_boots(sd_journal *j) { printf("% *i " SD_ID128_FORMAT_STR " %s—%s\n", w, i - count + 1, SD_ID128_FORMAT_VAL(id->id), - format_timestamp(a, sizeof(a), id->first), - format_timestamp(b, sizeof(b), id->last)); + format_timestamp_internal(a, sizeof(a), id->first, arg_utc), + format_timestamp_internal(b, sizeof(b), id->last, arg_utc)); } return 0; @@ -1502,8 +1502,8 @@ static int verify(sd_journal *j) { if (arg_verify_key && JOURNAL_HEADER_SEALED(f->header)) { if (validated > 0) { log_info("=> Validated from %s to %s, final %s entries not sealed.", - format_timestamp(a, sizeof(a), first), - format_timestamp(b, sizeof(b), validated), + format_timestamp_internal(a, sizeof(a), first, arg_utc), + format_timestamp_internal(b, sizeof(b), validated, arg_utc), format_timespan(c, sizeof(c), last > validated ? last - validated : 0, 0)); } else if (last > 0) log_info("=> No sealing yet, %s of entries not sealed.", @@ -1898,11 +1898,11 @@ int main(int argc, char *argv[]) { if (r > 0) { if (arg_follow) printf("-- Logs begin at %s. --\n", - format_timestamp(start_buf, sizeof(start_buf), start)); + format_timestamp_internal(start_buf, sizeof(start_buf), start, arg_utc)); else printf("-- Logs begin at %s, end at %s. --\n", - format_timestamp(start_buf, sizeof(start_buf), start), - format_timestamp(end_buf, sizeof(end_buf), end)); + format_timestamp_internal(start_buf, sizeof(start_buf), start, arg_utc), + format_timestamp_internal(end_buf, sizeof(end_buf), end, arg_utc)); } } |