aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorHarish Krishnaswamy <kharish@novell.com>2006-07-07 17:50:10 +0800
committerHarish Krishnaswamy <kharish@src.gnome.org>2006-07-07 17:50:10 +0800
commit6b792c8fa1b2ba493412cdfada4a38bc7687afef (patch)
tree5c50afb42bf53bc40445b3859a3c5ecbe4cb0d88 /calendar
parent54484209dbb934c2d22adbd0987a3b9cd567cd10 (diff)
downloadgsoc2013-evolution-6b792c8fa1b2ba493412cdfada4a38bc7687afef.tar
gsoc2013-evolution-6b792c8fa1b2ba493412cdfada4a38bc7687afef.tar.gz
gsoc2013-evolution-6b792c8fa1b2ba493412cdfada4a38bc7687afef.tar.bz2
gsoc2013-evolution-6b792c8fa1b2ba493412cdfada4a38bc7687afef.tar.lz
gsoc2013-evolution-6b792c8fa1b2ba493412cdfada4a38bc7687afef.tar.xz
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
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/e-cal-model.c22
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);
}