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/ChangeLog | 6 ++++++ calendar/gui/e-cal-model-calendar.c | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 43f8f8dede..e30cd9f62c 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2005-11-29 Chenthill Palanisamy + + Fixes #322616 + * gui/e-cal-model-calendar.c: (get_dtend): Convert to + proper time zone. + 2005-11-28 Chenthill Palanisamy Fixes #317322 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