diff options
author | Harish Krishnaswamy <kharish@novell.com> | 2006-07-07 17:50:10 +0800 |
---|---|---|
committer | Harish Krishnaswamy <kharish@src.gnome.org> | 2006-07-07 17:50:10 +0800 |
commit | 6b792c8fa1b2ba493412cdfada4a38bc7687afef (patch) | |
tree | 5c50afb42bf53bc40445b3859a3c5ecbe4cb0d88 | |
parent | 54484209dbb934c2d22adbd0987a3b9cd567cd10 (diff) | |
download | gsoc2013-evolution-6b792c8fa1b2ba493412cdfada4a38bc7687afef.tar.gz gsoc2013-evolution-6b792c8fa1b2ba493412cdfada4a38bc7687afef.tar.zst gsoc2013-evolution-6b792c8fa1b2ba493412cdfada4a38bc7687afef.zip |
Handle the start_time_zone != end_time_zone scenario. Fixes
2006-07-07 Harish Krishnaswamy <kharish@novell.com>
* gui/e-cal-model.c: (e_cal_model_set_instance_times):
Handle the start_time_zone != end_time_zone scenario.
Fixes bugzilla.novell.com #190421.
svn path=/trunk/; revision=32251
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/gui/e-cal-model.c | 22 |
2 files changed, 28 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 97b9fcfea0..454c059eaa 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2006-07-07 Harish Krishnaswamy <kharish@novell.com> + + * gui/e-cal-model.c: (e_cal_model_set_instance_times): + Handle the start_time_zone != end_time_zone scenario. + Fixes bugzilla.novell.com #190421. + 2006-07-07 Wang Xin <jedy.wang@sun.com> Fixes #345222 diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 51441d8fab..2de983ab10 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -2133,5 +2133,27 @@ e_cal_model_set_instance_times (ECalModelComponent *comp_data, icaltimezone *zon comp_data->instance_start = icaltime_as_timet_with_zone (start_time, zone); + if (end_time.zone) + zone = end_time.zone; + else { + icalparameter *param = NULL; + icalproperty *prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DTSTART_PROPERTY); + + if (prop) { + param = icalproperty_get_first_parameter (prop, ICAL_TZID_PARAMETER); + + if (param) { + const char *tzid = NULL; + icaltimezone *end_zone = NULL; + + tzid = icalparameter_get_tzid (param); + e_cal_get_timezone (comp_data->client, tzid, &end_zone, NULL); + + if (end_zone) + zone = end_zone; + } + } + + } comp_data->instance_end = icaltime_as_timet_with_zone (end_time, zone); } |