diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-12-05 22:43:55 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-12-05 23:24:09 -0800 |
commit | 15f20c0bd06a25bbb4ea90e501ef85290509c43b (patch) | |
tree | e1adafdd3420ecd38459628115baf1f05affb906 /lisp/timezone.el | |
parent | 186637314dfa287b4b8178b668de92ecb57fdf1a (diff) | |
download | emacs-15f20c0bd06a25bbb4ea90e501ef85290509c43b.tar.gz emacs-15f20c0bd06a25bbb4ea90e501ef85290509c43b.tar.bz2 emacs-15f20c0bd06a25bbb4ea90e501ef85290509c43b.zip |
Simplify RFC 5322 time zone generation
* lisp/mail/feedmail.el (feedmail-rfc822-time-zone)
(feedmail-rfc822-date, feedmail-default-message-id-generator):
* lisp/mail/mail-utils.el (mail-rfc822-time-zone, mail-rfc822-date):
* lisp/timezone.el (timezone-make-arpa-date):
Simplify by using format-time-string with %z.
* lisp/mail/feedmail.el (feedmail-rfc822-time-zone):
* lisp/mail/mail-utils.el (mail-rfc822-time-zone):
Mark these should-have-been-internal functions obsolete.
Diffstat (limited to 'lisp/timezone.el')
-rw-r--r-- | lisp/timezone.el | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lisp/timezone.el b/lisp/timezone.el index 2c96343a74b..0fcdbdbc16c 100644 --- a/lisp/timezone.el +++ b/lisp/timezone.el @@ -95,10 +95,7 @@ if nil, the local time zone is assumed." Optional argument TIMEZONE specifies a time zone." (let ((zone (if (listp timezone) - (let* ((m (timezone-zone-to-minute timezone)) - (absm (if (< m 0) (- m) m))) - (format "%c%02d%02d" - (if (< m 0) ?- ?+) (/ absm 60) (% absm 60))) + (format-time-string "%z" 0 (or timezone 0)) timezone))) (format "%02d %s %04d %s %s" day |