summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarish Krishnaswamy <kharish@src.gnome.org>2004-07-05 06:21:48 +0000
committerHarish Krishnaswamy <kharish@src.gnome.org>2004-07-05 06:21:48 +0000
commit16dce5c4db3747d7277b074a4e789f3d3adaf39e (patch)
tree653e17bb8aeade442d84b3f4f399b9376b6e64af
parente1a5320adbe2eaf4e0e87f8d8aa1fc270fecea51 (diff)
downloadevolution-data-server-16dce5c4db3747d7277b074a4e789f3d3adaf39e.tar.gz
Fixes #60463 Added a timezone argument and used it to convert the freebusy
Fixes #60463 * backends/groupwise/e-cal-backend-groupwise-utils.c: (e_gw_connection_get_freebusy_info): Added a timezone argument and used it to convert the freebusy times to default timezone.
-rw-r--r--calendar/ChangeLog8
-rw-r--r--calendar/backends/groupwise/e-cal-backend-groupwise-utils.c12
-rw-r--r--calendar/backends/groupwise/e-cal-backend-groupwise-utils.h2
-rw-r--r--calendar/backends/groupwise/e-cal-backend-groupwise.c5
4 files changed, 22 insertions, 5 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 72026c3b2..0a0c6415a 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,11 @@
+2004-06-28 Chenthill Palanisamy <pchenthill@novell.com>
+
+ Fixes #60463
+ * backends/groupwise/e-cal-backend-groupwise-utils.c:
+ (e_gw_connection_get_freebusy_info):
+ Added a timezone argument and used it to convert the freebusy
+ times to default timezone.
+
2004-06-15 Harish Krishnaswamy <kharish@novell.com>
Fixes #59352
diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
index 910e81b38..6011cb3ac 100644
--- a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
+++ b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
@@ -695,7 +695,7 @@ close_freebusy_session (EGwConnection *cnc, const char *session)
}
EGwConnectionStatus
-e_gw_connection_get_freebusy_info (EGwConnection *cnc, GList *users, time_t start, time_t end, GList **freebusy)
+e_gw_connection_get_freebusy_info (EGwConnection *cnc, GList *users, time_t start, time_t end, GList **freebusy, icaltimezone *default_zone)
{
SoupSoapMessage *msg;
SoupSoapResponse *response;
@@ -808,7 +808,10 @@ e_gw_connection_get_freebusy_info (EGwConnection *cnc, GList *users, time_t star
if (tmp) {
start = soup_soap_parameter_get_string_value (tmp);
t = e_gw_connection_get_date_from_string (start);
- itt = icaltime_from_timet (t, 0);
+ if (default_zone)
+ itt = icaltime_from_timet_with_zone (t, 0, default_zone);
+ else
+ itt = icaltime_from_timet_with_zone (t, 0, 0);
ipt.start = itt;
}
@@ -816,7 +819,10 @@ e_gw_connection_get_freebusy_info (EGwConnection *cnc, GList *users, time_t star
if (tmp) {
end = soup_soap_parameter_get_string_value (tmp);
t = e_gw_connection_get_date_from_string (end);
- itt = icaltime_from_timet (t, 0);
+ if (default_zone)
+ itt = icaltime_from_timet_with_zone (t, 0, default_zone);
+ else
+ itt = icaltime_from_timet_with_zone (t, 0, 0);
ipt.end = itt;
}
icalprop = icalproperty_new_freebusy (ipt);
diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.h b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.h
index c44b30092..443a7c25a 100644
--- a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.h
+++ b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.h
@@ -41,7 +41,7 @@ void e_gw_item_set_changes (EGwItem *item, EGwItem *cached_item);
*/
EGwConnectionStatus e_gw_connection_send_appointment (EGwConnection *cnc, const char *container, icaltimezone *default_zone, ECalComponent *comp, char **id);
EGwConnectionStatus e_gw_connection_get_freebusy_info (EGwConnection *cnc, GList *users,
- time_t start, time_t end, GList **freebusy);
+ time_t start, time_t end, GList **freebusy, icaltimezone *default_zone);
G_END_DECLS
diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise.c b/calendar/backends/groupwise/e-cal-backend-groupwise.c
index 5e0f93145..c6343229e 100644
--- a/calendar/backends/groupwise/e-cal-backend-groupwise.c
+++ b/calendar/backends/groupwise/e-cal-backend-groupwise.c
@@ -799,11 +799,14 @@ e_cal_backend_groupwise_get_free_busy (ECalBackendSync *backend, EDataCal *cal,
EGwConnectionStatus status;
ECalBackendGroupwise *cbgw;
EGwConnection *cnc;
+ icaltimezone *default_zone;
cbgw = E_CAL_BACKEND_GROUPWISE (backend);
cnc = cbgw->priv->cnc;
+ default_zone = cbgw->priv->default_zone;
+
- status = e_gw_connection_get_freebusy_info (cnc, users, start, end, freebusy);
+ status = e_gw_connection_get_freebusy_info (cnc, users, start, end, freebusy, default_zone);
if (status != E_GW_CONNECTION_STATUS_OK)
return GNOME_Evolution_Calendar_OtherError;
return GNOME_Evolution_Calendar_Success;