summaryrefslogtreecommitdiff
path: root/lisp/mail/sendmail.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-12-05 22:52:26 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2021-12-05 23:24:09 -0800
commitdbef2145c78a8b6cd913d677e50a0b7df0b1b831 (patch)
treebe6a2d1f5d1e0277c8227d8c2cf3b5e5958ccc73 /lisp/mail/sendmail.el
parent15f20c0bd06a25bbb4ea90e501ef85290509c43b (diff)
downloademacs-dbef2145c78a8b6cd913d677e50a0b7df0b1b831.tar.gz
Simplify by using format-time-string
* lisp/mail/sendmail.el (mail-do-fcc): * lisp/net/tramp.el (tramp-debug-message): Prefer format-time-string to doing time formatting by hand.
Diffstat (limited to 'lisp/mail/sendmail.el')
-rw-r--r--lisp/mail/sendmail.el14
1 files changed, 5 insertions, 9 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index d0aff093dfe..d1e8a2f3c69 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1391,8 +1391,7 @@ just append to the file, in Babyl format if necessary."
(unless (markerp header-end)
(error "Value of `header-end' must be a marker"))
(let (fcc-list
- (mailbuf (current-buffer))
- (time (current-time)))
+ (mailbuf (current-buffer)))
(save-excursion
(goto-char (point-min))
(let ((case-fold-search t))
@@ -1408,14 +1407,11 @@ just append to the file, in Babyl format if necessary."
(with-temp-buffer
;; This initial newline is not written out if we create a new
;; file (see below).
- (insert "\nFrom " (user-login-name) " " (current-time-string time) "\n")
- ;; Insert the time zone before the year.
- (forward-char -1)
- (forward-word-strictly -1)
(require 'mail-utils)
- (insert (mail-rfc822-time-zone time) " ")
- (goto-char (point-max))
- (insert "Date: " (message-make-date) "\n")
+ (insert "\nFrom " (user-login-name) " "
+ (let ((system-time-locale "C"))
+ (format-time-string "%a %b %e %T %z %Y"))
+ "\nDate: " (message-make-date) "\n")
(insert-buffer-substring mailbuf)
;; Make sure messages are separated.
(goto-char (point-max))