* Decapsulate and dezonify calendar events as they are
authorArt Cancro <ajc@citadel.org>
Wed, 26 Nov 2008 18:03:21 +0000 (18:03 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 26 Nov 2008 18:03:21 +0000 (18:03 +0000)
  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
webcit/event.c

index 58df701806ef0448ad284af6d410cf6e29baa590..373cfc25a114affa9f865a174fa2194933cb2e37 100644 (file)
@@ -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)) {
index f1af019dbb6afff84365517749c185359720bab4..37e2e2627a688b8df297cf98c4ee916ade5f1285 100644 (file)
@@ -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