1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-22 16:20:23 +02:00

31419: Add time zone and year to string formatted time output from zstat

This commit is contained in:
Peter Stephenson 2013-05-21 17:42:57 +01:00
parent 692a15363f
commit a4d3b8f676
2 changed files with 5 additions and 2 deletions

View file

@ -1,5 +1,8 @@
2013-05-21 Peter Stephenson <p.stephenson@samsung.com>
* 31419: Src/Modules/stat.c: Add time zone and year to
default time format with -s option to zstat.
* 31418: Doc/Zsh/calsys.yo, Functions/Calendar/age:
in "age" docs correct typo and note the feature that
you can supply a file as a timestamp on the command line.

View file

@ -339,7 +339,7 @@ statprint(struct stat *sbuf, char *outbuf, char *fname, int iwhich, int flags)
* -H hash: as for -A array, but returns a hash with the keys being those
* from stat -l
* -F fmt: specify a $TIME-like format for printing times; the default
* is the (CTIME-like) "%a %b %e %k:%M:%S". This option implies
* is the (CTIME-like) "%a %b %e %k:%M:%S %Z %Y". This option implies
* -s as it is not useful for numerical times.
*
* +type selects just element type of stat buffer (-l gives list):
@ -361,7 +361,7 @@ bin_stat(char *name, char **args, Options ops, UNUSED(int func))
struct stat statbuf;
int found = 0, nargs;
timefmt = "%a %b %e %k:%M:%S";
timefmt = "%a %b %e %k:%M:%S %Z %Y";
for (; *args && (**args == '+' || **args == '-'); args++) {
char *arg = *args+1;