aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1993-04-17 21:46:13 +0000
committerRichard M. Stallman1993-04-17 21:46:13 +0000
commit5e6cb310a7b0da7f7331aa9c391e1d1e4dafa79b (patch)
tree4333b4cd1df61cc87350a3b30158c8b43c5d5b7a /lisp
parent8872923579c23f1a23a7a8b06c4f5e728592773c (diff)
downloademacs-5e6cb310a7b0da7f7331aa9c391e1d1e4dafa79b.tar.gz
emacs-5e6cb310a7b0da7f7331aa9c391e1d1e4dafa79b.zip
(mail-do-fcc): Make a numeric time zone indicator
with current-time-zone--don't run `date'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mail/sendmail.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 0d2cb929f81..e5a463ba746 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -370,14 +370,15 @@ the user from the mailer."
370 fcc-list)) 370 fcc-list))
371 (delete-region (match-beginning 0) 371 (delete-region (match-beginning 0)
372 (progn (forward-line 1) (point)))) 372 (progn (forward-line 1) (point))))
373 (let* ((foo (current-time-zone))
374 (offset (+ (car foo) (if (nth 1 foo) 60 0)))
375 (abs (abs offset)))
376 (setq timezone (format "%s%02d%02d"
377 (if (< offset 0) "-" "+")
378 (/ abs 60)
379 (% abs 60))))
373 (set-buffer tembuf) 380 (set-buffer tembuf)
374 (erase-buffer) 381 (erase-buffer)
375 (call-process "date" nil t nil)
376 (goto-char (point-min))
377 (re-search-forward
378 "[0-9] \\([A-Za-z][-A-Za-z ]*[A-Za-z]\\)[0-9 ]*$")
379 (setq timezone (buffer-substring (match-beginning 1) (match-end 1)))
380 (erase-buffer)
381 (insert "\nFrom " (user-login-name) " " 382 (insert "\nFrom " (user-login-name) " "
382 (current-time-string) "\n") 383 (current-time-string) "\n")
383 ;; Insert the time zone before the year. 384 ;; Insert the time zone before the year.