diff options
| -rw-r--r-- | lisp/mail/sendmail.el | 13 |
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. |