]> git.eshelyaron.com Git - emacs.git/commitdiff
Use RFC 822 abbrevs in sunrise-sunset strings
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 30 Dec 2022 03:16:09 +0000 (19:16 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 30 Dec 2022 05:32:15 +0000 (21:32 -0800)
* lisp/calendar/solar.el (sunrise-sunset): Use RFC 822 time zone
abbreviations like "+0530" instead of idiosyncratic abbreviations
like "UTC+330min".

lisp/calendar/solar.el

index 8f501824bb0466997ca4119b4d6662b693267c6b..0b5bc1665301a2aa105c1ee6aaf126ffb05e353e 100644 (file)
@@ -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