[evolution-mapi] Bug #655824 - Use StartTimeZone when EndTimeZone is missing



commit 4a010b9b2da517a743aa8e8a9d6d152d0725422e
Author: Milan Crha <mcrha redhat com>
Date:   Wed Aug 3 08:23:26 2011 +0200

    Bug #655824 - Use StartTimeZone when EndTimeZone is missing

 src/libexchangemapi/exchange-mapi-cal-utils.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/libexchangemapi/exchange-mapi-cal-utils.c b/src/libexchangemapi/exchange-mapi-cal-utils.c
index d5fbd30..aee8dcd 100644
--- a/src/libexchangemapi/exchange-mapi-cal-utils.c
+++ b/src/libexchangemapi/exchange-mapi-cal-utils.c
@@ -822,7 +822,12 @@ exchange_mapi_cal_util_mapi_props_to_comp (ExchangeMapiConnection *conn, mapi_id
 		}
 
 		if (exchange_mapi_util_find_array_datetime_namedid (&t, properties, conn, fid, PidLidAppointmentEndWhole) == MAPI_E_SUCCESS) {
-			icaltimezone *zone = dtend_tz_location ? icaltimezone_get_builtin_timezone (dtend_tz_location) : (icaltimezone *)default_zone;
+			icaltimezone *zone;
+
+			if (!dtend_tz_location)
+				dtend_tz_location = dtstart_tz_location;
+
+			zone = dtend_tz_location ? icaltimezone_get_builtin_timezone (dtend_tz_location) : (icaltimezone *) default_zone;
 			prop = icalproperty_new_dtend (icaltime_from_timet_with_zone (t.tv_sec, all_day, zone));
 			if (!all_day && zone && icaltimezone_get_tzid (zone)) {
 				icalproperty_add_parameter (prop, icalparameter_new_tzid (icaltimezone_get_tzid (zone)));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]