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
This commit is contained in:
Michael Paepcke 2023-07-27 08:28:50 +00:00 committed by Ed Maste
parent 4bdf7f6951
commit 6f4ce7e89b

View file

@ -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");
}