1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-10 09:43:26 -08:00

Fix icalendar time zone parsing glitch

* lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
Use pcase instead of cl-case, as cl-macs might not be loaded.
Otherwise, a build complains “calendar/icalendar.el:618:57:
Warning: ‘90’ is a malformed function” and some
icalendar--decode-isodatetime tests fail.  This fixes a bug
introduced in 2021-11-21T08:18:57Z!dick.r.chiang@gmail.com.
This commit is contained in:
Paul Eggert 2021-12-16 09:40:21 -08:00
parent 34e3ad5ae4
commit 3e6c69de9d

View file

@ -645,10 +645,10 @@ FIXME: multiple comma-separated values should be allowed!"
(setq second (read (substring isodatetimestring 13 15))))
;; FIXME: Support subseconds.
(when (> (length isodatetimestring) 15)
(cl-case (aref isodatetimestring 15)
(pcase (aref isodatetimestring 15)
(?Z
(setq source-zone t))
((?- ?+)
((or ?- ?+)
(setq source-zone
(concat "UTC" (substring isodatetimestring 15))))))
;; shift if necessary