Port TZ settings to POSIX

* lisp/Makefile.in (.el.elc):
* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-times):
Use the POSIX standard TZ=UTC0 rather than the GNU extension
TZ=UTC to set the time zone to UTC.
This commit is contained in:
Paul Eggert 2022-10-02 16:49:20 -07:00
parent 0d0d59b32c
commit 3951199985
3 changed files with 3 additions and 3 deletions

View file

@ -315,7 +315,7 @@ ifeq ($(ANCIENT),yes)
.el.elc:
$(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) \
-l comp -f batch-byte-compile $<
TZ=UTC touch -t 197001010000 $@
TZ=UTC0 touch -t 197001010000 $@
else
.el.elc:
$(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) \

View file

@ -1528,7 +1528,7 @@ of."
time)))
(tramp-send-command-and-check
v (format
"env TZ=UTC %s %s %s %s"
"env TZ=UTC0 %s %s %s %s"
(tramp-get-remote-touch v)
(if (tramp-get-connection-property v "touch-t")
(format "-t %s" (format-time-string "%Y%m%d%H%M.%S" time t))

View file

@ -568,7 +568,7 @@ the result will be a local, non-Tramp, file name."
nil
time)))
(tramp-sudoedit-send-command
v "env" "TZ=UTC" "touch" "-t"
v "env" "TZ=UTC0" "touch" "-t"
(format-time-string "%Y%m%d%H%M.%S" time t)
(if (eq flag 'nofollow) "-h" "")
(tramp-compat-file-name-unquote localname)))))