From ac5164c6f2b3875e7155a43d48d08a75f55f0a90 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 26 Nov 2008 18:03:21 +0000 Subject: [PATCH] * Decapsulate and dezonify calendar events as they are being loaded into the event editor. TODO: convert back to local time during save, otherwise we create the shifting-hour DST problem for recurring events. We might consider only converting to local time for recurring events ... that's what Google Calendar does. --- webcit/calendar.c | 12 ------------ webcit/event.c | 4 ++++ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/webcit/calendar.c b/webcit/calendar.c index 58df70180..373cfc25a 100644 --- a/webcit/calendar.c +++ b/webcit/calendar.c @@ -1000,18 +1000,6 @@ void load_ical_object(long msgnum, int unread, cal = icalcomponent_new_from_string(relevant_source); if (cal != NULL) { - /* FIXME temp */ - icalproperty *p; - p = icalcomponent_get_first_property(cal, ICAL_DTSTART_PROPERTY); - if (p) { - lprintf(9, "DTSTART IS %s\n", - icaltime_as_ical_string( - icalproperty_get_dtstart(p) - ) - ); - } - /* */ - /* A which_kind of (-1) means just load the whole thing */ if (which_kind == (-1)) { diff --git a/webcit/event.c b/webcit/event.c index f1af019db..37e2e2627 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -71,6 +71,10 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, if (supplied_vevent != NULL) { vevent = supplied_vevent; + + /* Convert all timestamps to UTC to make them easier to process. */ + ical_dezonify(vevent); + /* * If we're looking at a fully encapsulated VCALENDAR * rather than a VEVENT component, attempt to use the first -- 2.39.2