From 6f4ce7e89ba4fa52566704533920352aa65c7f9b Mon Sep 17 00:00:00 2001 From: Michael Paepcke Date: Thu, 27 Jul 2023 08:28:50 +0000 Subject: [PATCH] lastcomm: improve timestamp display Adjust the lastcomm command to output timestamps with a precision of seconds. Reported by: Dr. Andreas Longwitz Reviewed by: emaste Relnotes: Yes Sponsored by: DSS Gmbh Pull Request: https://github.com/freebsd/freebsd-src/pull/802 --- usr.bin/lastcomm/lastcomm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/lastcomm/lastcomm.c b/usr.bin/lastcomm/lastcomm.c index bcd84b2ed37..b97755e7bb0 100644 --- a/usr.bin/lastcomm/lastcomm.c +++ b/usr.bin/lastcomm/lastcomm.c @@ -191,7 +191,7 @@ main(int argc, char *argv[]) localtime(&ab.ac_btime)); (void)printf(" %s", buf); } else - (void)printf(" %.16s", ctime(&ab.ac_btime)); + (void)printf(" %.19s", ctime(&ab.ac_btime)); } /* exit time (starting time + elapsed time )*/ @@ -203,7 +203,7 @@ main(int argc, char *argv[]) localtime(&t)); (void)printf(" %s", buf); } else - (void)printf(" %.16s", ctime(&t)); + (void)printf(" %.19s", ctime(&t)); } printf("\n"); }