]> git.eshelyaron.com Git - emacs.git/commitdiff
Use decoded time accessors in in em-ls
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 30 Jul 2019 11:10:03 +0000 (13:10 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 30 Jul 2019 11:10:03 +0000 (13:10 +0200)
* lisp/eshell/em-ls.el (eshell-ls-file): Use decoded time
accessors.

lisp/eshell/em-ls.el

index 89969d3258210d7f3480b2e268fbc123cc2d73f9..b1aab79538f7ec55268d4d5b449156af0a1cb416 100644 (file)
@@ -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)