From 08cc914872d36dce8b38e5dbe5f9bf31ff80841b Mon Sep 17 00:00:00 2001 From: Miika Alikirri Date: Mon, 8 Jan 2024 15:02:56 +0200 Subject: [PATCH] last: Add time-format to usage output and man page --- man/wtmpdb.8.xml | 21 +++++++++++++++++++++ src/wtmpdb.c | 3 +++ 2 files changed, 24 insertions(+) diff --git a/man/wtmpdb.8.xml b/man/wtmpdb.8.xml index 558e9ba..014d05f 100644 --- a/man/wtmpdb.8.xml +++ b/man/wtmpdb.8.xml @@ -192,6 +192,27 @@ + + + + FORMAT + + + + Display timestamps in the specified + FORMAT. The format can be + notime, + short, + full, or + iso. + notime will not display times at + all, short is the default option, + full will display the full times + and dates, and iso will display + times in ISO-8601 format. + + + TIME must be in the format diff --git a/src/wtmpdb.c b/src/wtmpdb.c index cdb03e6..aac7b5b 100644 --- a/src/wtmpdb.c +++ b/src/wtmpdb.c @@ -541,6 +541,9 @@ usage (int retval) fputs (" -t, --until TIME Display who was logged in until TIME\n", output); fputs (" -w, --fullnames Display full IP addresses and user and domain names\n", output); fputs (" -x, --system Display system shutdown entries\n", output); + fputs (" --time-format FORMAT Display timestamps in the specified FORMAT:\n", output); + fputs (" notime|short|full|iso\n", output); + fputs (" [username...] Display only entries matching these arguments\n", output); fputs (" [tty...] Display only entries matching these arguments\n", output); fputs ("TIME must be in the format \"YYYY-MM-DD HH:MM:SS\"\n", output);