Skip to content

Commit 659646f

Browse files
eggertkyleam
authored andcommitted
Backport commit e0ca8f791 from Emacs
* lisp/ox-icalendar.el (org-icalendar-template) (org-icalendar-export-current-agenda) (org-icalendar--combine-files): Prefer (format-time-string "%Z") to (cadr (current-time-zone)). Prefer format-time-string to current-time-zone e0ca8f791c2e4396f1e40d86c136ae547b40185d Paul Eggert Thu Dec 16 11:17:26 2021 -0800 [ km: The org-icalendar--combine-files change has a typo that will be fixed in a follow-up commit. ]
1 parent 772c447 commit 659646f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lisp/ox-icalendar.el

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,7 @@ as a communication channel."
824824
(if (not (plist-get info :with-author)) ""
825825
(org-export-data (plist-get info :author) info))
826826
;; Timezone.
827-
(if (org-string-nw-p org-icalendar-timezone) org-icalendar-timezone
828-
(cadr (current-time-zone)))
827+
(or (org-string-nw-p org-icalendar-timezone) (format-time-string "%Z"))
829828
;; Description.
830829
(org-export-data (plist-get info :title) info)
831830
contents))
@@ -972,7 +971,7 @@ This function assumes major mode for current buffer is
972971
(org-icalendar--vcalendar
973972
org-icalendar-combined-name
974973
user-full-name
975-
(or (org-string-nw-p org-icalendar-timezone) (cadr (current-time-zone)))
974+
(or (org-string-nw-p org-icalendar-timezone) (format-time-string "%Z"))
976975
org-icalendar-combined-description
977976
contents)))
978977
(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."
995994
user-full-name
996995
;; Timezone.
997996
(or (org-string-nw-p org-icalendar-timezone)
998-
(cadr (current-time-zone)))
997+
(format-time-string "Z"))
999998
;; Description.
1000999
org-icalendar-combined-description
10011000
;; Contents.

0 commit comments

Comments
 (0)