summaryrefslogtreecommitdiff
path: root/lisp/calendar/icalendar.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/calendar/icalendar.el')
-rw-r--r--lisp/calendar/icalendar.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el
index 439fb6dd29a..1a5a071e202 100644
--- a/lisp/calendar/icalendar.el
+++ b/lisp/calendar/icalendar.el
@@ -644,13 +644,13 @@ FIXME: multiple comma-separated values should be allowed!"
;; seconds present
(setq second (read (substring isodatetimestring 13 15))))
;; FIXME: Support subseconds.
- (when (and (> (length isodatetimestring) 15)
- ;; UTC specifier present
- (char-equal ?Z (aref isodatetimestring 15)))
- (setq source-zone t
- ;; decode to local time unless result-zone is explicitly given,
- ;; i.e. do not decode to UTC, i.e. do not (setq result-zone t)
- ))
+ (when (> (length isodatetimestring) 15)
+ (pcase (aref isodatetimestring 15)
+ (?Z
+ (setq source-zone t))
+ ((or ?- ?+)
+ (setq source-zone
+ (concat "UTC" (substring isodatetimestring 15))))))
;; shift if necessary
(if day-shift
(let ((mdy (calendar-gregorian-from-absolute