From e17affcfcc0c7d1dbf43cfc461223c5008cca206 Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Mon, 20 Nov 2006 14:16:34 +0000 Subject: Fixes #367183. svn path=/trunk/; revision=33003 --- calendar/gui/e-cal-model.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'calendar/gui') diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 0797144c3e..6b47fb96e1 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -2105,7 +2105,16 @@ e_cal_model_set_instance_times (ECalModelComponent *comp_data, const icaltimezon start_time = icalcomponent_get_dtstart (comp_data->icalcomp); end_time = icalcomponent_get_dtend (comp_data->icalcomp); - if (start_time.is_date && end_time.is_date && (icaltime_compare_date_only (start_time, end_time) == 0)) { + if (icaltime_is_null_time (end_time)) { + /* If end_time is null and it's an all day event, + * just make start_time = end_time so that end_time + * will be a valid date + */ + end_time = start_time; + icaltime_adjust (&end_time, 1, 0, 0, 0); + icalcomponent_set_dtend (comp_data->icalcomp, end_time); + } else if (start_time.is_date && end_time.is_date && + (icaltime_compare_date_only (start_time, end_time) == 0)) { /* If both DTSTART and DTEND are DATE values, and they are the same day, we add 1 day to DTEND. This means that most events created with the old Evolution behavior will still -- cgit v1.2.3