`local' and `ut' date.
* lisp/gnus-art.el (article-make-date-line): Fix `ut' date.
* lisp/parse-time.el (parse-time-string): The last element of the
return list should be TZ.
* lisp/message.el (message-send): Eval 'message-fix-before-sending'
after encoding.
A snapshot is available from
ftp://ftp.jpl.org/pub/tmp/semi-gnus-pgnus-ichikawa-
19980911-1.tar.gz
+1998-09-11 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * lisp/gnus-art.el (article-make-date-line): Add TZ value to
+ `local' and `ut' date.
+
+ * lisp/gnus-art.el (article-make-date-line): Fix `ut' date.
+
+ * lisp/parse-time.el (parse-time-string): The last element of the
+ return list should be TZ.
+
+ * lisp/message.el (message-send): Eval 'message-fix-before-sending'
+ after encoding.
+
1998-09-10 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus-spec.el (gnus-tilde-pad-form): Use old macro form.
;; functions since they aren't particularly resistant to
;; buggy dates.
((eq type 'local)
- (concat "Date: " (current-time-string time)))
+ (let ((tz (car (current-time-zone))))
+ (format "Date: %s %s%04d" (current-time-string time)
+ (if (> tz 0) "+" "-") (abs (/ tz 36)))))
;; Convert to Universal Time.
((eq type 'ut)
(concat "Date: "
(current-time-string
- (let ((e (parse-time-string date)))
- (setcar (last e) 0)
- (apply 'encode-time e)))))
+ (let* ((e (parse-time-string date))
+ (tm (apply 'encode-time e))
+ (ms (car tm))
+ (ls (- (cadr tm) (car (current-time-zone)))))
+ (cond ((< ls 0) (list (1- ms) (+ ls 65536)))
+ ((> ls 65535) (list (1+ ms) (- ls 65536)))
+ (t (list ms ls)))))
+ " UT"))
;; Get the original date from the article.
((eq type 'original)
- (concat "Date: " date))
+ (concat "Date: " (if (string-match "\n+$" date)
+ (substring date 0 (match-beginning 0))
+ date)))
;; Let the user define the format.
((eq type 'user)
(if (gnus-functionp gnus-article-time-format)
(undo-boundary)
(let ((inhibit-read-only t))
(put-text-property (point-min) (point-max) 'read-only nil))
- (message-fix-before-sending)
(run-hooks 'message-send-hook)
(message "Sending...")
(let ((message-encoding-buffer
(erase-buffer)
(insert-buffer message-edit-buffer)
(funcall message-encode-function)
+ (message-fix-before-sending)
(while (and success
(setq elem (pop alist)))
(when (and (or (not (funcall (cadr elem)))
"Parse the time-string STRING into (SEC MIN HOUR DAY MON YEAR DOW DST TZ).
The values are identical to those of `decode-time', but any values that are
unknown are returned as nil."
- (let ((time (list nil nil nil nil nil nil nil nil nil nil))
+ (let ((time (list nil nil nil nil nil nil nil nil nil))
(temp (parse-time-tokenize (downcase string))))
(while temp
(let ((elt (pop temp))