summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2013-05-21 17:42:57 +0100
committerPeter Stephenson <pws@zsh.org>2013-05-21 17:42:57 +0100
commita4d3b8f676c336e4504d5f400e98fb55aba78a37 (patch)
tree63d0f65204ea658ec0a1f233271904bada496ecf
parent692a15363f1332ad62e3e915a7842fbc343d45b3 (diff)
downloadzsh-a4d3b8f676c336e4504d5f400e98fb55aba78a37.tar.gz
zsh-a4d3b8f676c336e4504d5f400e98fb55aba78a37.zip
31419: Add time zone and year to string formatted time output from zstat
-rw-r--r--ChangeLog3
-rw-r--r--Src/Modules/stat.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index de7e70309..956b37dcd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/Src/Modules/stat.c b/Src/Modules/stat.c
index a3e95bb59..edae0841e 100644
--- a/Src/Modules/stat.c
+++ b/Src/Modules/stat.c
@@ -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;