Skip to content

Commit

Permalink
lastcomm: improve timestamp display
Browse files Browse the repository at this point in the history
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:	freebsd#802

(cherry picked from commit 6f4ce7e)
  • Loading branch information
paepckehh authored and emaste committed Jan 6, 2024
1 parent 50fa374 commit 812516a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions usr.bin/lastcomm/lastcomm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )*/
Expand All @@ -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");
}
Expand Down

0 comments on commit 812516a

Please sign in to comment.