Bug#422236: emacs-snapshot: Tar mode should use the ISO8601 format to display the timestamps (or support TIME_STYLE)
Vincent Lefevre writes:
> Package: emacs-snapshot
> Version: 1:20070302-1
Just FYI, emacs-snapshot is now maintained outside of Debian, please
look at http://emacs.orebokech.com/ for newer versions ([1], [2]).
> When tar-mode-show-date is set to t (to get the timestamps), the Tar
> mode displays them in a non-standard format. It should use the ISO8601
> format (this is what GNU tar (version 1.16.1) does).
That would be easy, please try out the following patch:
--- tar-mode.el~ 2007-01-21 04:53:10.000000000 +0100
+++ tar-mode.el 2007-05-04 17:08:32.000000000 +0200
@@ -319,8 +319,7 @@
(progn (beep) (message "Invalid checksum for file %s!" file-name))))
(defun tar-clip-time-string (time)
- (let ((str (current-time-string time)))
- (concat " " (substring str 4 16) (substring str 19 24))))
+ (format-time-string " %Y-%m-%d %H:%M" time))
(defun tar-grind-file-mode (mode)
"Construct a `-rw--r--r--' string indicating MODE.
@@ -634,7 +633,7 @@
"Move cursor vertically down ARG lines and to the start of the filename."
(interactive "p")
(forward-line arg)
- (if (eobp) nil (forward-char (if tar-mode-show-date 54 36))))
+ (if (eobp) nil (forward-char (if tar-mode-show-date 53 36))))
(defun tar-previous-line (arg)
"Move cursor vertically up ARG lines and to the start of the filename."
> Other formats
> (e.g. one corresponding to the locales) could be used via an option;
> in particular, the support of the TIME_STYLE environment variable
> (see coreutils manual) would be a good idea.
You should make your proposals on the emacs-devel mailing list, there
are the developers who can implement them.
Cheers,
Sven
[1]http://lists.debian.org/debian-emacsen/2007/03/msg00012.html
[2]http://lists.debian.org/debian-emacsen/2007/04/msg00002.html
Reply to: