summaryrefslogtreecommitdiff
path: root/lisp/calendar/solar.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-12-29 19:16:09 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2022-12-29 21:32:15 -0800
commit007e66bccb2cb8382158e5e24727fd1b4478cd69 (patch)
tree9b98bf53e8bcdc5ad721ff8e500ab84765deae11 /lisp/calendar/solar.el
parentbc4cbbcc57a56a23c64576c8c23ecf6afb1c747b (diff)
downloademacs-007e66bccb2cb8382158e5e24727fd1b4478cd69.tar.gz
Use RFC 822 abbrevs in sunrise-sunset strings
* lisp/calendar/solar.el (sunrise-sunset): Use RFC 822 time zone abbreviations like "+0530" instead of idiosyncratic abbreviations like "UTC+330min".
Diffstat (limited to 'lisp/calendar/solar.el')
-rw-r--r--lisp/calendar/solar.el10
1 files changed, 4 insertions, 6 deletions
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index 8f501824bb0..0b5bc166530 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -839,12 +839,10 @@ This function is suitable for execution in an init file."
"E" "W"))))))
(calendar-standard-time-zone-name
(if (< arg 16) calendar-standard-time-zone-name
- (cond ((zerop calendar-time-zone)
- (if (eq calendar-time-zone-style 'numeric)
- "+0000" "UTC"))
- ((< calendar-time-zone 0)
- (format "UTC%dmin" calendar-time-zone))
- (t (format "UTC+%dmin" calendar-time-zone)))))
+ (if (and (zerop calendar-time-zone)
+ (not (eq calendar-time-zone-style 'numeric)))
+ "UTC"
+ (format-time-string "%z" 0 (* 60 calendar-time-zone)))))
(calendar-daylight-savings-starts
(if (< arg 16) calendar-daylight-savings-starts))
(calendar-daylight-savings-ends