From bddd4d382a0e91c73326f1e278924ce9e5624cd7 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 30 Jul 2019 13:10:03 +0200 Subject: [PATCH] Use decoded time accessors in in em-ls * lisp/eshell/em-ls.el (eshell-ls-file): Use decoded time accessors. --- lisp/eshell/em-ls.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index 89969d32582..b1aab79538f 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -525,12 +525,14 @@ whose cdr is the list of file attributes." " " (format-time-string (concat eshell-ls-date-format " " - (if (= (nth 5 (decode-time)) - (nth 5 (decode-time - (nth (cond - ((eq sort-method 'by-atime) 4) - ((eq sort-method 'by-ctime) 6) - (t 5)) attrs)))) + (if (= (decoded-time-year (decode-time)) + (decoded-time-year + (decode-time + (nth (cond + ((eq sort-method 'by-atime) 4) + ((eq sort-method 'by-ctime) 6) + (t 5)) + attrs)))) "%H:%M" " %Y")) (nth (cond ((eq sort-method 'by-atime) 4) -- 2.39.2