1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-12 10:44:12 -08:00

* net/tramp.el (tramp-touch): Use UTC to express time.

This commit is contained in:
Michael Albinus 2006-06-15 21:55:39 +00:00
parent c43d75391a
commit 8a7269eb1b
2 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,7 @@
2006-06-15 Katsumi Yamaoka <yamaoka@jpl.org> (tiny change)
* net/tramp.el (tramp-touch): Use UTC to express time.
2006-06-15 Chong Yidong <cyd@stupidchicken.com>
* mail/sendmail.el (mail-send): Search explicitly for

View file

@ -5017,15 +5017,16 @@ hosts, or files, disagree."
(defun tramp-touch (file time)
"Set the last-modified timestamp of the given file.
TIME is an Emacs internal time value as returned by `current-time'."
(let ((touch-time (format-time-string "%Y%m%d%H%M.%S" time)))
(let ((touch-time (format-time-string "%Y%m%d%H%M.%S" time t)))
(if (tramp-tramp-file-p file)
(with-parsed-tramp-file-name file nil
(let ((buf (tramp-get-buffer multi-method method user host)))
(unless (zerop (tramp-send-command-and-check
multi-method method user host
(format "touch -t %s %s"
(format "TZ=UTC; export TZ; touch -t %s %s"
touch-time
localname)))
localname)
t))
(pop-to-buffer buf)
(error "tramp-touch: touch failed, see buffer `%s' for details"
buf))))