Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: zstat date and time output



Following the various issues with times and dates going by, I've just
noticed that the default string output for times from "zstat -s" omits
the year, which seems a bit bizarre.  Presumably I intended to use a
standard ctime-like output, which the following does.

diff --git a/Src/Modules/stat.c b/Src/Modules/stat.c
index a3e95bb..515c3cd 100644
--- a/Src/Modules/stat.c
+++ b/Src/Modules/stat.c
@@ -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;

pws



Messages sorted by: Reverse Date, Date, Thread, Author