From d945a55a5f8fcffc74545d8d42394bcecdea2402 Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Tue, 29 Nov 2005 08:15:08 +0000 Subject: fixes #322616 svn path=/trunk/; revision=30704 --- calendar/gui/e-cal-model-calendar.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/e-cal-model-calendar.c b/calendar/gui/e-cal-model-calendar.c index aa3d667b62..d79a5eecde 100644 --- a/calendar/gui/e-cal-model-calendar.c +++ b/calendar/gui/e-cal-model-calendar.c @@ -116,7 +116,7 @@ get_dtend (ECalModelCalendar *model, ECalModelComponent *comp_data) if (!comp_data->dtend) { icalproperty *prop; - icaltimezone *zone, *model_zone; + icaltimezone *zone = NULL, *model_zone = NULL; gboolean got_zone = FALSE; prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DTEND_PROPERTY); @@ -129,13 +129,16 @@ get_dtend (ECalModelCalendar *model, ECalModelComponent *comp_data) && e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_end), &zone, NULL)) got_zone = TRUE; + model_zone = e_cal_model_get_timezone (E_CAL_MODEL (model)); + if (e_cal_model_get_flags (E_CAL_MODEL (model)) & E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES) { if (got_zone) { tt_end = icaltime_from_timet_with_zone (comp_data->instance_end, tt_end.is_date, zone); - if ((model_zone = e_cal_model_get_timezone (E_CAL_MODEL (model)))) + if (model_zone) icaltimezone_convert_time (&tt_end, zone, model_zone); } else - tt_end = icaltime_from_timet (comp_data->instance_end, tt_end.is_date); + tt_end = icaltime_from_timet_with_zone (comp_data->instance_end, tt_end.is_date, + model_zone); } if (!icaltime_is_valid_time (tt_end) || icaltime_is_null_time (tt_end)) -- cgit v1.2.3