git: 6f4ce7e89ba4 - main - lastcomm: improve timestamp display
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 22 Sep 2023 15:26:14 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=6f4ce7e89ba4fa52566704533920352aa65c7f9b
commit 6f4ce7e89ba4fa52566704533920352aa65c7f9b
Author: Michael Paepcke <git@paepcke.de>
AuthorDate: 2023-07-27 08:28:50 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-09-22 14:59:45 +0000
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 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");
}