[evolution-patches] patch for bug #60463 calendar



hi,
  Attached a patch which gets the default zone as an extra argument,
converts the freebusy time to the default timezone using the function
icatime_from_timet_with_zone() . It was not showing some of the freebusy
times before, since no conversion from UTC timezone to default timezone
was made.

thanks, chenthill


? patch_freebusy.diff
? backends/groupwise/.e-cal-backend-groupwise-utils.c.swp
? backends/groupwise/modif
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.292
diff -u -r1.292 ChangeLog
--- ChangeLog	15 Jun 2004 15:59:07 -0000	1.292
+++ ChangeLog	29 Jun 2004 10:23:08 -0000
@@ -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	
Index: backends/groupwise/e-cal-backend-groupwise-utils.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c,v
retrieving revision 1.22
diff -u -r1.22 e-cal-backend-groupwise-utils.c
--- backends/groupwise/e-cal-backend-groupwise-utils.c	15 Jun 2004 15:59:07 -0000	1.22
+++ backends/groupwise/e-cal-backend-groupwise-utils.c	29 Jun 2004 10:23:09 -0000
@@ -695,7 +695,7 @@
 }
 
 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 @@
 			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 @@
 			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);
Index: backends/groupwise/e-cal-backend-groupwise-utils.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise-utils.h,v
retrieving revision 1.5
diff -u -r1.5 e-cal-backend-groupwise-utils.h
--- backends/groupwise/e-cal-backend-groupwise-utils.h	18 May 2004 17:16:54 -0000	1.5
+++ backends/groupwise/e-cal-backend-groupwise-utils.h	29 Jun 2004 10:23:10 -0000
@@ -41,7 +41,7 @@
  */
 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
 
Index: backends/groupwise/e-cal-backend-groupwise.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise.c,v
retrieving revision 1.72
diff -u -r1.72 e-cal-backend-groupwise.c
--- backends/groupwise/e-cal-backend-groupwise.c	14 Jun 2004 05:53:23 -0000	1.72
+++ backends/groupwise/e-cal-backend-groupwise.c	29 Jun 2004 10:23:11 -0000
@@ -799,11 +799,14 @@
        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; 


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