aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net
diff options
context:
space:
mode:
authorMichael Albinus2006-06-15 21:55:39 +0000
committerMichael Albinus2006-06-15 21:55:39 +0000
commit8a7269eb1bdbce425ea372573e81bf7affcaa8d9 (patch)
tree67236baf8a3aec48ccb99ec1351caddff8def0b5 /lisp/net
parentc43d75391af8665435c3db30eb61ca4630bd6a06 (diff)
downloademacs-8a7269eb1bdbce425ea372573e81bf7affcaa8d9.tar.gz
emacs-8a7269eb1bdbce425ea372573e81bf7affcaa8d9.zip
* net/tramp.el (tramp-touch): Use UTC to express time.
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/tramp.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 2ebc4d0b45e..c4166bb6d24 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -5017,15 +5017,16 @@ hosts, or files, disagree."
5017(defun tramp-touch (file time) 5017(defun tramp-touch (file time)
5018 "Set the last-modified timestamp of the given file. 5018 "Set the last-modified timestamp of the given file.
5019TIME is an Emacs internal time value as returned by `current-time'." 5019TIME is an Emacs internal time value as returned by `current-time'."
5020 (let ((touch-time (format-time-string "%Y%m%d%H%M.%S" time))) 5020 (let ((touch-time (format-time-string "%Y%m%d%H%M.%S" time t)))
5021 (if (tramp-tramp-file-p file) 5021 (if (tramp-tramp-file-p file)
5022 (with-parsed-tramp-file-name file nil 5022 (with-parsed-tramp-file-name file nil
5023 (let ((buf (tramp-get-buffer multi-method method user host))) 5023 (let ((buf (tramp-get-buffer multi-method method user host)))
5024 (unless (zerop (tramp-send-command-and-check 5024 (unless (zerop (tramp-send-command-and-check
5025 multi-method method user host 5025 multi-method method user host
5026 (format "touch -t %s %s" 5026 (format "TZ=UTC; export TZ; touch -t %s %s"
5027 touch-time 5027 touch-time
5028 localname))) 5028 localname)
5029 t))
5029 (pop-to-buffer buf) 5030 (pop-to-buffer buf)
5030 (error "tramp-touch: touch failed, see buffer `%s' for details" 5031 (error "tramp-touch: touch failed, see buffer `%s' for details"
5031 buf)))) 5032 buf))))