Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using ISO 8601 format output time for easy sorting #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.pod
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Interpret targets as paths to local files.
=item B<-t, --timefmt> <format>

Output time described by the specified I<format>. This string is passed directly
to strftime(3). The default format is %c.
to strftime(3). The default format is %FT%T.

=item B<-v, --verbose>

Expand Down Expand Up @@ -182,7 +182,7 @@ List the oldest 10 installed packages (by build date):

=over 4

$ expac --timefmt=%s '%b\t%n' | sort -n | head -10
$ expac '%b\t%n' | sort | head -10

=back

Expand Down
4 changes: 2 additions & 2 deletions expac.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

#define DEFAULT_DELIM "\n"
#define DEFAULT_LISTDELIM " "
#define DEFAULT_TIMEFMT "%c"
#define DEFAULT_TIMEFMT "%FT%T"
#define SIZE_TOKENS "BKMGTPEZY\0"

#ifndef PATH_MAX
Expand Down Expand Up @@ -147,7 +147,7 @@ static void usage(void)
" -d, --delim <string> separator used between packages (default: \"\\n\")\n"
" -l, --listdelim <string> separator used between list elements (default: \" \")\n"
" -p, --file query local files instead of the DB\n"
" -t, --timefmt <fmt> date format passed to strftime (default: \"%%c\")\n"
" -t, --timefmt <fmt> date format passed to strftime (default: \"%%FT%%T\")\n"
" --config <file> read from <file> for alpm initialization (default: /etc/pacman.conf)\n\n"
" -v, --verbose be more verbose\n\n"
" -h, --help display this help and exit\n\n"
Expand Down