changeset 2551:551af54fb173

(mail-do-fcc): Make a numeric time zone indicator with current-time-zone--don't run `date'.
author Richard M. Stallman <rms@gnu.org>
date Sat, 17 Apr 1993 21:46:13 +0000
parents 28bca94e66c3
children ce9a2a209b97
files lisp/mail/sendmail.el
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/sendmail.el	Sat Apr 17 06:45:29 1993 +0000
+++ b/lisp/mail/sendmail.el	Sat Apr 17 21:46:13 1993 +0000
@@ -370,14 +370,15 @@
 			     fcc-list))
 	(delete-region (match-beginning 0)
 		       (progn (forward-line 1) (point))))
+      (let* ((foo (current-time-zone))
+	     (offset (+ (car foo) (if (nth 1 foo) 60 0)))
+	     (abs (abs offset)))
+	(setq timezone (format "%s%02d%02d"
+			       (if (< offset 0) "-" "+")
+			       (/ abs 60)
+			       (% abs 60))))
       (set-buffer tembuf)
       (erase-buffer)
-      (call-process "date" nil t nil)
-      (goto-char (point-min))
-      (re-search-forward 
-        "[0-9] \\([A-Za-z][-A-Za-z ]*[A-Za-z]\\)[0-9 ]*$")
-      (setq timezone (buffer-substring (match-beginning 1) (match-end 1)))
-      (erase-buffer)
       (insert "\nFrom " (user-login-name) " "
 	      (current-time-string) "\n")
       ;; Insert the time zone before the year.