aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorUlf Jasper2019-09-09 18:35:02 +0200
committerUlf Jasper2019-09-09 18:35:02 +0200
commit74e9799bd89484b8d15bdd6597c68fc00d07e7f7 (patch)
tree74756323a885eb3ce329c68ccb6852682db7a9e7 /lisp
parent4042dad139d922723aabcfaef5662db8204fb355 (diff)
downloademacs-74e9799bd89484b8d15bdd6597c68fc00d07e7f7.tar.gz
emacs-74e9799bd89484b8d15bdd6597c68fc00d07e7f7.zip
Handle missing start-time when importing ical event (Bug#33277)
* lisp/calendar/icalendar.el (icalendar--convert-ical-to-diary): Set start time only if it is explicitly given in ical. Do not use start-time as default for end-time (Bug#33277). * test/lisp/calendar/icalendar-tests.el (icalendar-import-bug-33277): New. Test fix for Bug#33277.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/calendar/icalendar.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el
index 3c46982c7b0..3ae0fcbe977 100644
--- a/lisp/calendar/icalendar.el
+++ b/lisp/calendar/icalendar.el
@@ -2095,7 +2095,9 @@ written into the buffer `*icalendar-errors*'."
2095 dtstart-zone)) 2095 dtstart-zone))
2096 (start-d (icalendar--datetime-to-diary-date 2096 (start-d (icalendar--datetime-to-diary-date
2097 dtstart-dec)) 2097 dtstart-dec))
2098 (start-t (icalendar--datetime-to-colontime dtstart-dec)) 2098 (start-t (and dtstart
2099 (> (length dtstart) 8)
2100 (icalendar--datetime-to-colontime dtstart-dec)))
2099 (dtend (icalendar--get-event-property e 'DTEND)) 2101 (dtend (icalendar--get-event-property e 'DTEND))
2100 (dtend-zone (icalendar--find-time-zone 2102 (dtend-zone (icalendar--find-time-zone
2101 (icalendar--get-event-property-attributes 2103 (icalendar--get-event-property-attributes
@@ -2148,8 +2150,7 @@ written into the buffer `*icalendar-errors*'."
2148 (icalendar--get-event-property-attributes 2150 (icalendar--get-event-property-attributes
2149 e 'DTEND)) 2151 e 'DTEND))
2150 "DATE"))) 2152 "DATE")))
2151 (icalendar--datetime-to-colontime dtend-dec) 2153 (icalendar--datetime-to-colontime dtend-dec)))
2152 start-t))
2153 (icalendar--dmsg "start-d: %s, end-d: %s" start-d end-d) 2154 (icalendar--dmsg "start-d: %s, end-d: %s" start-d end-d)
2154 (cond 2155 (cond
2155 ;; recurring event 2156 ;; recurring event