aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2015-07-20 09:47:39 -0700
committerPaul Eggert2015-07-20 09:48:02 -0700
commit136dd7bc02576a10ea77b33afd3cb9179c064e3d (patch)
tree77d31beb6a7da146c6b1de8b2d911c5e6bd31609
parent057f93499eb0491ef816b71523242e18ae810cd5 (diff)
downloademacs-136dd7bc02576a10ea77b33afd3cb9179c064e3d.tar.gz
emacs-136dd7bc02576a10ea77b33afd3cb9179c064e3d.zip
Simplify icalendar decoding of Z dates
* lisp/calendar/icalendar.el (icalendar--decode-isodatetime): Simplify calculation of time strings with trailing "Z".
-rw-r--r--lisp/calendar/icalendar.el8
1 files changed, 1 insertions, 7 deletions
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el
index da5d85eaf24..3e2a2f8a858 100644
--- a/lisp/calendar/icalendar.el
+++ b/lisp/calendar/icalendar.el
@@ -618,13 +618,7 @@ FIXME: multiple comma-separated values should be allowed!"
618 (when (and (> (length isodatetimestring) 15) 618 (when (and (> (length isodatetimestring) 15)
619 ;; UTC specifier present 619 ;; UTC specifier present
620 (char-equal ?Z (aref isodatetimestring 15))) 620 (char-equal ?Z (aref isodatetimestring 15)))
621 ;; if not UTC add current-time-zone offset 621 (setq zone t))
622 ;; current-time-zone should be called with actual UTC time
623 ;; (daylight saving at that time may differ to current one)
624 (setq second (+ (car (current-time-zone
625 (encode-time second minute hour day month year
626 0)))
627 second)))
628 ;; shift if necessary 622 ;; shift if necessary
629 (if day-shift 623 (if day-shift
630 (let ((mdy (calendar-gregorian-from-absolute 624 (let ((mdy (calendar-gregorian-from-absolute