From 3c728d4c69f2abe991ef84787ae1014ad1cd29d2 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 9 Aug 2020 12:34:23 +0200 Subject: Add a variable to allow displaying numeric time zones * lisp/calendar/calendar.el (calendar-use-numeric-time-zones): New variable. * doc/emacs/calendar.texi (Sunrise/Sunset): Document it (bug#33149). * lisp/calendar/cal-dst.el (calendar-standard-time-zone-name): Use it. (calendar-daylight-time-zone-name): Ditto. * lisp/calendar/solar.el (sunrise-sunset): Adjust usage. (solar-equinoxes-solstices): Ditto. --- lisp/calendar/solar.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lisp/calendar/solar.el') diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index 6a813e9ee82..20a20df4603 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el @@ -840,7 +840,9 @@ 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) "UTC") + (cond ((zerop calendar-time-zone) + (if calendar-use-numeric-time-zones + "+0100" "UTC")) ((< calendar-time-zone 0) (format "UTC%dmin" calendar-time-zone)) (t (format "UTC+%dmin" calendar-time-zone))))) @@ -1013,7 +1015,10 @@ Requires floating point." (let* ((m displayed-month) (y displayed-year) (calendar-standard-time-zone-name - (if calendar-time-zone calendar-standard-time-zone-name "UTC")) + (cond + (calendar-time-zone calendar-standard-time-zone-name) + (calendar-use-numeric-time-zones "+0100") + (t "UTC"))) (calendar-daylight-savings-starts (if calendar-time-zone calendar-daylight-savings-starts)) (calendar-daylight-savings-ends -- cgit v1.2.1