]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer format-time-string to current-time-zone
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Dec 2021 17:40:22 +0000 (09:40 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Dec 2021 19:17:26 +0000 (11:17 -0800)
* lisp/org/ox-icalendar.el (org-icalendar-template)
(org-icalendar-export-current-agenda)
(org-icalendar--combine-files):
* lisp/time.el (display-time-update):
Prefer (format-time-string "%Z") to (cadr (current-time-zone)).

lisp/org/ox-icalendar.el
lisp/time.el

index 16c3dc9a02993dbb79b0a1e5119f16dc327ad87c..211d0f716b8a8bb63eb6144e4dfc5d3fd700df8c 100644 (file)
@@ -824,8 +824,7 @@ as a communication channel."
    (if (not (plist-get info :with-author)) ""
      (org-export-data (plist-get info :author) info))
    ;; Timezone.
-   (if (org-string-nw-p org-icalendar-timezone) org-icalendar-timezone
-     (cadr (current-time-zone)))
+   (or (org-string-nw-p org-icalendar-timezone) (format-time-string "%Z"))
    ;; Description.
    (org-export-data (plist-get info :title) info)
    contents))
@@ -972,7 +971,7 @@ This function assumes major mode for current buffer is
        (org-icalendar--vcalendar
        org-icalendar-combined-name
        user-full-name
-       (or (org-string-nw-p org-icalendar-timezone) (cadr (current-time-zone)))
+       (or (org-string-nw-p org-icalendar-timezone) (format-time-string "%Z"))
        org-icalendar-combined-description
        contents)))
     (run-hook-with-args 'org-icalendar-after-save-hook file)))
@@ -995,7 +994,7 @@ FILES is a list of files to build the calendar from."
              user-full-name
              ;; Timezone.
              (or (org-string-nw-p org-icalendar-timezone)
-                 (cadr (current-time-zone)))
+                 (format-time-string "Z"))
              ;; Description.
              org-icalendar-combined-description
              ;; Contents.
index fcea064b4cfda0adafa7198e958d6a1ab4e1d142..b67315cf630110403da45dc5347e15bf50491b3f 100644 (file)
@@ -355,7 +355,7 @@ update which can wait for the next redisplay."
          (am-pm (if (>= hour 12) "pm" "am"))
          (minutes (substring time 14 16))
          (seconds (substring time 17 19))
-         (time-zone (car (cdr (current-time-zone now))))
+        (time-zone (format-time-string "%Z" now))
          (day (substring time 8 10))
          (year (format-time-string "%Y" now))
          (monthname (substring time 4 7))