diff options
author | Michael Paepcke <git@paepcke.de> | 2023-07-27 08:28:50 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2024-01-07 01:27:18 +0000 |
commit | 692c0a2e80c1df7e401c803bebe165923044e223 (patch) | |
tree | 449a69d311faf177dbf35a930c8a4beda9526c55 | |
parent | 1cf8528fec85a965baa5df2d8852166437af88a6 (diff) |
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
(cherry picked from commit 6f4ce7e89ba4fa52566704533920352aa65c7f9b)
-rw-r--r-- | usr.bin/lastcomm/lastcomm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/lastcomm/lastcomm.c b/usr.bin/lastcomm/lastcomm.c index bcd84b2ed37a..b97755e7bb03 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"); } |