? core.3124
? core.594
? daylight_eds.diff
? daylight_eds_updated.diff
? tt
? ttt
? backends/core.29329
? backends/caldav/Makefile
? backends/caldav/Makefile.in
? backends/file/core.3224
? backends/groupwise/core.10235
? backends/groupwise/core.6866
? backends/groupwise/log
? backends/groupwise/tt
? libical/tt
? libical/src/libical/.icalrecur.h.swp
? libical/zoneinfo/Europe/core.12049
? libical/zoneinfo/Europe/core.21096
? libical/zoneinfo/Europe/core.23116
? libical/zoneinfo/Europe/core.23729
? libical/zoneinfo/Europe/core.8636
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.590
diff -u -p -r1.590 ChangeLog
--- ChangeLog	21 Jun 2006 13:18:48 -0000	1.590
+++ ChangeLog	3 Jul 2006 07:16:51 -0000
@@ -1,3 +1,43 @@
+2006-07-01  Chenthill Palanisamy  <pchenthill@novell.com>
+
+	* backends/caldav/e-cal-backend-caldav.c:
+	(caldav_set_default_zone), (e_cal_backend_caldav_class_init):
+	* backends/contacts/e-cal-backend-contacts.c:
+	(e_cal_backend_contacts_open),
+	(e_cal_backend_contacts_set_default_zone),
+	(e_cal_backend_contacts_finalize),
+	(e_cal_backend_contacts_class_init):
+	* backends/file/e-cal-backend-file.c:
+	(e_cal_backend_file_finalize), (e_cal_backend_file_open),
+	(e_cal_backend_file_set_default_zone),
+	(e_cal_backend_file_class_init):
+	* backends/groupwise/e-cal-backend-groupwise.c:
+	(connect_to_server), (e_cal_backend_groupwise_finalize),
+	(e_cal_backend_groupwise_open),
+	(e_cal_backend_groupwise_set_default_zone),
+	(e_cal_backend_groupwise_class_init):
+	* backends/http/e-cal-backend-http.c:
+	(e_cal_backend_http_finalize), (e_cal_backend_http_open),
+	(e_cal_backend_http_set_default_zone),
+	(e_cal_backend_http_class_init):
+	* backends/weather/e-cal-backend-weather.c:
+	(e_cal_backend_weather_open),
+	(e_cal_backend_weather_set_default_zone),
+	(e_cal_backend_weather_finalize),
+	(e_cal_backend_weather_class_init):
+	* idl/Evolution-DataServer-Calendar.idl:
+	* libedata-cal/e-cal-backend-sync.c:
+	(e_cal_backend_sync_set_default_zone),
+	(_e_cal_backend_set_default_zone), (e_cal_backend_sync_class_init):
+	* libedata-cal/e-cal-backend-sync.h:
+	* libedata-cal/e-cal-backend.c: (e_cal_backend_set_default_zone):
+	* libedata-cal/e-cal-backend.h:
+	* libedata-cal/e-data-cal.c: (impl_Cal_setDefaultTimezone): Added
+	e_cal_backend_set_zone as a replacement for e_cal_backend_set_timezone.
+	Replaced the same for all backends.	
+	* libecal/e-cal.c: (e_cal_set_default_timezone): Pass the timezone object
+	as a string instead of the tzid.
+
 2006-06-21  Harish Krishnaswamy  <kharish@novell.com>
 
 	* backends/groupwise/e-cal-backend-groupwise.c: (populate_cache):
Index: backends/caldav/e-cal-backend-caldav.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/caldav/e-cal-backend-caldav.c,v
retrieving revision 1.7
diff -u -p -r1.7 e-cal-backend-caldav.c
--- backends/caldav/e-cal-backend-caldav.c	13 Jun 2006 07:25:23 -0000	1.7
+++ backends/caldav/e-cal-backend-caldav.c	3 Jul 2006 07:16:51 -0000
@@ -2171,9 +2171,9 @@ caldav_add_timezone (ECalBackendSync *ba
 }
 
 static ECalBackendSyncStatus
-caldav_set_default_timezone (ECalBackendSync *backend, 
+caldav_set_default_zone (ECalBackendSync *backend, 
 			     EDataCal        *cal,
-			     const char      *tzid)
+			     const char      *tzobj)
 {
 	/* FIXME: implement me! */
 	g_warning ("function not implemented %s", G_STRFUNC);
@@ -2536,7 +2536,7 @@ e_cal_backend_caldav_class_init (ECalBac
 	sync_class->get_object_list_sync      = caldav_get_object_list;
 	sync_class->get_timezone_sync         = caldav_get_timezone;
 	sync_class->add_timezone_sync         = caldav_add_timezone;
-	sync_class->set_default_timezone_sync = caldav_set_default_timezone;
+	sync_class->set_default_zone_sync = caldav_set_default_zone;
 	sync_class->get_freebusy_sync         = caldav_get_free_busy;
 	sync_class->get_changes_sync          = caldav_get_changes;
 
Index: backends/contacts/e-cal-backend-contacts.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/contacts/e-cal-backend-contacts.c,v
retrieving revision 1.29
diff -u -p -r1.29 e-cal-backend-contacts.c
--- backends/contacts/e-cal-backend-contacts.c	5 Apr 2006 09:59:55 -0000	1.29
+++ backends/contacts/e-cal-backend-contacts.c	3 Jul 2006 07:16:51 -0000
@@ -732,8 +732,15 @@ e_cal_backend_contacts_open (ECalBackend
 
         if (priv->addressbook_loaded)
                 return GNOME_Evolution_Calendar_Success;
+		
+        if (priv->default_zone) {
+		icalcomponent *icalcomp = icaltimezone_get_component (priv->default_zone);
+		icaltimezone *zone = icaltimezone_new ();
+
+		icaltimezone_set_component (zone, icalcomponent_new_clone (icalcomp));
 
-        e_cal_backend_contacts_add_timezone (backend, cal, (const char *) icaltimezone_get_tzid (priv->default_zone));
+		g_hash_table_insert (priv->zones, g_strdup (icaltimezone_get_tzid (zone)), zone);
+	}
 
 	/* Create address books for existing sources */
         for (i = e_source_list_peek_groups (priv->addressbook_sources); i; i = i->next) {
@@ -825,21 +832,33 @@ e_cal_backend_contacts_add_timezone (ECa
 }
 
 static ECalBackendSyncStatus
-e_cal_backend_contacts_set_default_timezone (ECalBackendSync *backend, EDataCal *cal, const char *tzid)
+e_cal_backend_contacts_set_default_zone (ECalBackendSync *backend, EDataCal *cal, const char *tzobj)
 {
+	icalcomponent *tz_comp;
 	ECalBackendContacts *cbcontacts;
 	ECalBackendContactsPrivate *priv;
+	icaltimezone *zone;
+
+	cbcontacts = (ECalBackendContacts *) backend;
+
+	g_return_val_if_fail (E_IS_CAL_BACKEND_CONTACTS (cbcontacts), GNOME_Evolution_Calendar_OtherError);
+	g_return_val_if_fail (tzobj != NULL, GNOME_Evolution_Calendar_OtherError);
 
-	cbcontacts = E_CAL_BACKEND_CONTACTS (backend);
 	priv = cbcontacts->priv;
 
-	priv->default_zone = e_cal_backend_internal_get_timezone (E_CAL_BACKEND (backend), tzid);
-	if (!priv->default_zone) {
-		priv->default_zone = icaltimezone_get_utc_timezone ();
+	tz_comp = icalparser_parse_string (tzobj);
+	if (!tz_comp)
+		return GNOME_Evolution_Calendar_InvalidObject;
+
+	zone = icaltimezone_new ();
+	icaltimezone_set_component (zone, tz_comp);
+
+	if (priv->default_zone && priv->default_zone != icaltimezone_get_utc_timezone ())
+		icaltimezone_free (priv->default_zone, 1);
+
+	/* Set the default timezone to it. */
+	priv->default_zone = zone;
 
-		return GNOME_Evolution_Calendar_ObjectNotFound;
-	}
-	
 	return GNOME_Evolution_Calendar_Success;
 }
 
@@ -928,6 +947,11 @@ e_cal_backend_contacts_finalize (GObject
 	cbc = E_CAL_BACKEND_CONTACTS (object);
 	priv = cbc->priv;
 
+	if (priv->default_zone) {
+		icaltimezone_free (priv->default_zone, 1);
+		priv->default_zone = NULL;
+	}
+
 	g_hash_table_destroy (priv->addressbooks);
         g_hash_table_destroy (priv->tracked_contacts);
         g_hash_table_destroy (priv->zones);
@@ -1006,7 +1030,7 @@ e_cal_backend_contacts_class_init (ECalB
 	sync_class->get_object_list_sync = e_cal_backend_contacts_get_object_list;
 	sync_class->get_timezone_sync = e_cal_backend_contacts_get_timezone;
 	sync_class->add_timezone_sync = e_cal_backend_contacts_add_timezone;
-	sync_class->set_default_timezone_sync = e_cal_backend_contacts_set_default_timezone;
+	sync_class->set_default_zone_sync = e_cal_backend_contacts_set_default_zone;
 	sync_class->get_freebusy_sync = e_cal_backend_contacts_get_free_busy;
 	sync_class->get_changes_sync = e_cal_backend_contacts_get_changes;
 	backend_class->is_loaded = e_cal_backend_contacts_is_loaded;
Index: backends/file/e-cal-backend-file.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/file/e-cal-backend-file.c,v
retrieving revision 1.75
diff -u -p -r1.75 e-cal-backend-file.c
--- backends/file/e-cal-backend-file.c	15 Jun 2006 01:51:34 -0000	1.75
+++ backends/file/e-cal-backend-file.c	3 Jul 2006 07:16:52 -0000
@@ -300,6 +300,11 @@ e_cal_backend_file_finalize (GObject *ob
 		priv->uri = NULL;
 	}
 
+	if (priv->default_zone) {
+		icaltimezone_free (priv->default_zone, 1);
+		priv->default_zone = NULL;
+	}
+
 	g_free (priv);
 	cbfile->priv = NULL;
 
@@ -916,8 +921,14 @@ e_cal_backend_file_open (ECalBackendSync
 			status = create_cal (cbfile, str_uri);
 	}
 
-	if (status == GNOME_Evolution_Calendar_Success)
-		e_cal_backend_file_add_timezone (backend, cal, (const char *) icaltimezone_get_tzid (priv->default_zone));
+	if (status == GNOME_Evolution_Calendar_Success) {
+		if (priv->default_zone) {
+			icalcomponent *icalcomp = icaltimezone_get_component (priv->default_zone);
+
+			icalcomponent_add_component (priv->icalcomp, icalcomponent_new_clone (icalcomp));
+			save (cbfile);
+		}
+	}
 
 	g_free (str_uri);
 
@@ -1193,18 +1204,33 @@ e_cal_backend_file_add_timezone (ECalBac
 	return GNOME_Evolution_Calendar_Success;
 }
 
-
 static ECalBackendSyncStatus
-e_cal_backend_file_set_default_timezone (ECalBackendSync *backend, EDataCal *cal, const char *tzid)
+e_cal_backend_file_set_default_zone (ECalBackendSync *backend, EDataCal *cal, const char *tzobj)
 {
+	icalcomponent *tz_comp;
 	ECalBackendFile *cbfile;
 	ECalBackendFilePrivate *priv;
+	icaltimezone *zone;
+
+	cbfile = (ECalBackendFile *) backend;
+
+	g_return_val_if_fail (E_IS_CAL_BACKEND_FILE (cbfile), GNOME_Evolution_Calendar_OtherError);
+	g_return_val_if_fail (tzobj != NULL, GNOME_Evolution_Calendar_OtherError);
 
-	cbfile = E_CAL_BACKEND_FILE (backend);
 	priv = cbfile->priv;
 
+	tz_comp = icalparser_parse_string (tzobj);
+	if (!tz_comp)
+		return GNOME_Evolution_Calendar_InvalidObject;
+
+	zone = icaltimezone_new ();
+	icaltimezone_set_component (zone, tz_comp);
+
+	if (priv->default_zone != icaltimezone_get_utc_timezone ())
+		icaltimezone_free (priv->default_zone, 1);
+
 	/* Set the default timezone to it. */
-	priv->default_zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
+	priv->default_zone = zone;
 
 	return GNOME_Evolution_Calendar_Success;
 }
@@ -2587,7 +2613,7 @@ e_cal_backend_file_class_init (ECalBacke
 	sync_class->get_attachment_list_sync = e_cal_backend_file_get_attachment_list;
 	sync_class->get_timezone_sync = e_cal_backend_file_get_timezone;
 	sync_class->add_timezone_sync = e_cal_backend_file_add_timezone;
-	sync_class->set_default_timezone_sync = e_cal_backend_file_set_default_timezone;
+	sync_class->set_default_zone_sync = e_cal_backend_file_set_default_zone;
 	sync_class->get_freebusy_sync = e_cal_backend_file_get_free_busy;
 	sync_class->get_changes_sync = e_cal_backend_file_get_changes;
 
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.181
diff -u -p -r1.181 e-cal-backend-groupwise.c
--- backends/groupwise/e-cal-backend-groupwise.c	21 Jun 2006 13:18:49 -0000	1.181
+++ backends/groupwise/e-cal-backend-groupwise.c	3 Jul 2006 07:16:52 -0000
@@ -920,8 +920,7 @@ connect_to_server (ECalBackendGroupwise 
 			}
 
 			e_cal_backend_cache_put_default_timezone (priv->cache, priv->default_zone);
-			e_cal_backend_groupwise_add_timezone (E_CAL_BACKEND_SYNC (cbgw), NULL, (const char *) icaltimezone_get_tzid (priv->default_zone));
-
+	
 			/* spawn a new thread for opening the calendar */
 			thread = g_thread_create ((GThreadFunc) cache_init, cbgw, FALSE, &error);
 			if (!thread) {
@@ -1018,6 +1017,11 @@ e_cal_backend_groupwise_finalize (GObjec
 		priv->timeout_id = 0;
 	}
 
+	if (priv->default_zone) {
+		icaltimezone_free (priv->default_zone, 1);
+		priv->default_zone = NULL;
+	}
+
 	g_free (priv);
 	cbgw->priv = NULL;
 
@@ -1169,7 +1173,6 @@ e_cal_backend_groupwise_open (ECalBacken
 		}
 		
 		e_cal_backend_cache_put_default_timezone (priv->cache, priv->default_zone);
-		e_cal_backend_groupwise_add_timezone (backend, cal, (const char *) icaltimezone_get_tzid (priv->default_zone));
 
 		g_mutex_unlock (priv->mutex);	
 		return GNOME_Evolution_Calendar_Success;
@@ -1424,16 +1427,32 @@ e_cal_backend_groupwise_add_timezone (EC
 }
 
 static ECalBackendSyncStatus
-e_cal_backend_groupwise_set_default_timezone (ECalBackendSync *backend, EDataCal *cal, const char *tzid)
+e_cal_backend_groupwise_set_default_zone (ECalBackendSync *backend, EDataCal *cal, const char *tzobj)
 {
+	icalcomponent *tz_comp;
 	ECalBackendGroupwise *cbgw;
-        ECalBackendGroupwisePrivate *priv;
+	ECalBackendGroupwisePrivate *priv;
+	icaltimezone *zone;
+
+	cbgw = (ECalBackendGroupwise *) backend;
+
+	g_return_val_if_fail (E_IS_CAL_BACKEND_GROUPWISE (cbgw), GNOME_Evolution_Calendar_OtherError);
+	g_return_val_if_fail (tzobj != NULL, GNOME_Evolution_Calendar_OtherError);
+
+	priv = cbgw->priv;
+
+	tz_comp = icalparser_parse_string (tzobj);
+	if (!tz_comp)
+		return GNOME_Evolution_Calendar_InvalidObject;
+
+	zone = icaltimezone_new ();
+	icaltimezone_set_component (zone, tz_comp);
+
+	if (priv->default_zone)
+		icaltimezone_free (priv->default_zone, 1);
 
-	cbgw = E_CAL_BACKEND_GROUPWISE (backend);
-        priv = cbgw->priv;
-	
 	/* Set the default timezone to it. */
-	priv->default_zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
+	priv->default_zone = zone;
 
 	return GNOME_Evolution_Calendar_Success;
 }
@@ -2661,7 +2680,7 @@ e_cal_backend_groupwise_class_init (ECal
 	sync_class->get_attachment_list_sync = e_cal_backend_groupwise_get_attachment_list;
 	sync_class->get_timezone_sync = e_cal_backend_groupwise_get_timezone;
 	sync_class->add_timezone_sync = e_cal_backend_groupwise_add_timezone;
-	sync_class->set_default_timezone_sync = e_cal_backend_groupwise_set_default_timezone;
+	sync_class->set_default_zone_sync = e_cal_backend_groupwise_set_default_zone;
 	sync_class->get_freebusy_sync = e_cal_backend_groupwise_get_free_busy;
 	sync_class->get_changes_sync = e_cal_backend_groupwise_get_changes;
 
Index: backends/http/e-cal-backend-http.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/http/e-cal-backend-http.c,v
retrieving revision 1.49
diff -u -p -r1.49 e-cal-backend-http.c
--- backends/http/e-cal-backend-http.c	16 Jan 2006 05:14:59 -0000	1.49
+++ backends/http/e-cal-backend-http.c	3 Jul 2006 07:16:52 -0000
@@ -123,6 +123,12 @@ e_cal_backend_http_finalize (GObject *ob
 		priv->uri = NULL;
 	}
 
+	if (priv->default_zone) {
+		icaltimezone_free (priv->default_zone, 1);
+		priv->default_zone = NULL;
+	}
+	
+
 	if (priv->soup_session) {
 		soup_session_abort (priv->soup_session);
 		g_object_unref (priv->soup_session);
@@ -523,7 +529,6 @@ e_cal_backend_http_open (ECalBackendSync
 		
 		if (priv->default_zone) {
 			e_cal_backend_cache_put_default_timezone (priv->cache, priv->default_zone);
-			e_cal_backend_http_add_timezone (backend, cal, (const char *) icaltimezone_get_tzid (priv->default_zone));
 		}
 
 		if (priv->mode == CAL_MODE_LOCAL) 
@@ -741,17 +746,34 @@ e_cal_backend_http_add_timezone (ECalBac
 }
 
 static ECalBackendSyncStatus
-e_cal_backend_http_set_default_timezone (ECalBackendSync *backend, EDataCal *cal, const char *tzid)
+e_cal_backend_http_set_default_zone (ECalBackendSync *backend, EDataCal *cal, const char *tzobj)
 {
+	icalcomponent *tz_comp;
 	ECalBackendHttp *cbhttp;
 	ECalBackendHttpPrivate *priv;
+	icaltimezone *zone;
+
+	cbhttp = (ECalBackendHttp *) backend;
+
+	g_return_val_if_fail (E_IS_CAL_BACKEND_HTTP (cbhttp), GNOME_Evolution_Calendar_OtherError);
+	g_return_val_if_fail (tzobj != NULL, GNOME_Evolution_Calendar_OtherError);
 
-	cbhttp = E_CAL_BACKEND_HTTP (backend);
 	priv = cbhttp->priv;
-	
+
+	tz_comp = icalparser_parse_string (tzobj);
+	if (!tz_comp)
+		return GNOME_Evolution_Calendar_InvalidObject;
+
+
+	zone = icaltimezone_new ();
+	icaltimezone_set_component (zone, tz_comp);
+
+	if (priv->default_zone)
+		icaltimezone_free (priv->default_zone, 1);
+
 	/* Set the default timezone to it. */
-	priv->default_zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
-	
+	priv->default_zone = zone;
+
 	return GNOME_Evolution_Calendar_Success;
 }
 
@@ -1204,7 +1226,7 @@ e_cal_backend_http_class_init (ECalBacke
 	sync_class->get_object_list_sync = e_cal_backend_http_get_object_list;
 	sync_class->get_timezone_sync = e_cal_backend_http_get_timezone;
 	sync_class->add_timezone_sync = e_cal_backend_http_add_timezone;
-	sync_class->set_default_timezone_sync = e_cal_backend_http_set_default_timezone;
+	sync_class->set_default_zone_sync = e_cal_backend_http_set_default_zone;
 	sync_class->get_freebusy_sync = e_cal_backend_http_get_free_busy;
 	sync_class->get_changes_sync = e_cal_backend_http_get_changes;
 
Index: backends/weather/e-cal-backend-weather.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/weather/e-cal-backend-weather.c,v
retrieving revision 1.15
diff -u -p -r1.15 e-cal-backend-weather.c
--- backends/weather/e-cal-backend-weather.c	14 Feb 2006 13:30:16 -0000	1.15
+++ backends/weather/e-cal-backend-weather.c	3 Jul 2006 07:16:53 -0000
@@ -446,13 +446,20 @@ e_cal_backend_weather_open (ECalBackendS
 	if (!priv->cache) {
 		priv->cache = e_cal_backend_cache_new (uri);
 
-		e_cal_backend_weather_add_timezone (backend, cal, (const char *) icaltimezone_get_tzid (priv->default_zone));
-
 		if (!priv->cache) {
 			e_cal_backend_notify_error (E_CAL_BACKEND (cbw), _("Could not create cache file"));
 			return GNOME_Evolution_Calendar_OtherError;
 		}
 
+		if (priv->default_zone) {
+			icalcomponent *icalcomp = icaltimezone_get_component (priv->default_zone);
+			icaltimezone *zone = icaltimezone_new ();
+
+			icaltimezone_set_component (zone, icalcomponent_new_clone (icalcomp));
+
+			g_hash_table_insert (priv->zones, g_strdup (icaltimezone_get_tzid (zone)), zone);
+		}
+
 		if (priv->mode == CAL_MODE_LOCAL)
 			return GNOME_Evolution_Calendar_Success;
 
@@ -602,20 +609,32 @@ e_cal_backend_weather_add_timezone (ECal
 }
 
 static ECalBackendSyncStatus
-e_cal_backend_weather_set_default_timezone (ECalBackendSync *backend, EDataCal *cal, const char *tzid)
+e_cal_backend_weather_set_default_zone (ECalBackendSync *backend, EDataCal *cal, const char *tzobj)
 {
+	icalcomponent *tz_comp;
 	ECalBackendWeather *cbw;
 	ECalBackendWeatherPrivate *priv;
+	icaltimezone *zone;
+
+	cbw = (ECalBackendWeather *) backend;
+
+	g_return_val_if_fail (E_IS_CAL_BACKEND_WEATHER (cbw), GNOME_Evolution_Calendar_OtherError);
+	g_return_val_if_fail (tzobj != NULL, GNOME_Evolution_Calendar_OtherError);
 
-	cbw = E_CAL_BACKEND_WEATHER (backend);
 	priv = cbw->priv;
 
-	priv->default_zone = e_cal_backend_internal_get_timezone (E_CAL_BACKEND (backend), tzid);
-	if (!priv->default_zone) {
-		priv->default_zone = icaltimezone_get_utc_timezone ();
+	tz_comp = icalparser_parse_string (tzobj);
+	if (!tz_comp)
+		return GNOME_Evolution_Calendar_InvalidObject;
 
-		return GNOME_Evolution_Calendar_ObjectNotFound;
-	}
+	zone = icaltimezone_new ();
+	icaltimezone_set_component (zone, tz_comp);
+
+	if (priv->default_zone)
+		icaltimezone_free (priv->default_zone, 1);
+
+	/* Set the default timezone to it. */
+	priv->default_zone = zone;
 
 	return GNOME_Evolution_Calendar_Success;
 }
@@ -807,6 +826,11 @@ e_cal_backend_weather_finalize (GObject 
 		priv->city = NULL;
 	}
 
+	if (priv->default_zone) {
+		icaltimezone_free (priv->default_zone, 1);
+		priv->default_zone = NULL;
+	}
+
 	g_free (priv);
 	cbw->priv = NULL;
 
@@ -866,7 +890,7 @@ e_cal_backend_weather_class_init (ECalBa
 	sync_class->get_object_list_sync = e_cal_backend_weather_get_object_list;
 	sync_class->get_timezone_sync = e_cal_backend_weather_get_timezone;
 	sync_class->add_timezone_sync = e_cal_backend_weather_add_timezone;
-	sync_class->set_default_timezone_sync = e_cal_backend_weather_set_default_timezone;
+	sync_class->set_default_zone_sync = e_cal_backend_weather_set_default_zone;
 	sync_class->get_freebusy_sync = e_cal_backend_weather_get_free_busy;
 	sync_class->get_changes_sync = e_cal_backend_weather_get_changes;
 	backend_class->is_loaded = e_cal_backend_weather_is_loaded;
Index: idl/Evolution-DataServer-Calendar.idl
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/idl/Evolution-DataServer-Calendar.idl,v
retrieving revision 1.14
diff -u -p -r1.14 Evolution-DataServer-Calendar.idl
--- idl/Evolution-DataServer-Calendar.idl	11 Oct 2005 07:56:20 -0000	1.14
+++ idl/Evolution-DataServer-Calendar.idl	3 Jul 2006 07:16:53 -0000
@@ -199,7 +199,7 @@ module Calendar {
 		oneway void getTimezone (in CalTimezoneObjUID tzid);
 		oneway void addTimezone (in CalTimezoneObj tz);
 		/* The timezone used to resolve DATE and floating DATE-TIME values. */
-		oneway void setDefaultTimezone (in CalTimezoneObjUID tzid);
+		oneway void setDefaultTimezone (in CalTimezoneObj tz);
 
 		/* Gets a list of components that changed */
 		oneway void getChanges (in string change_id);
Index: libecal/e-cal.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal.c,v
retrieving revision 1.126
diff -u -p -r1.126 e-cal.c
--- libecal/e-cal.c	15 Jun 2006 16:41:43 -0000	1.126
+++ libecal/e-cal.c	3 Jul 2006 07:16:53 -0000
@@ -5028,7 +5028,8 @@ e_cal_set_default_timezone (ECal *ecal, 
 	CORBA_Environment ev;
 	ECalendarStatus status;
 	ECalendarOp *our_op;
-	const char *tzid;
+	icalcomponent *icalcomp = NULL;
+	char *tzobj;
 
 	e_return_error_if_fail (ecal && E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);	
 	e_return_error_if_fail (zone, E_CALENDAR_STATUS_INVALID_ARG);	
@@ -5053,12 +5054,22 @@ e_cal_set_default_timezone (ECal *ecal, 
 	g_mutex_unlock (priv->mutex);
 
 	/* FIXME Adding it to the server to change the tzid */
-	tzid = icaltimezone_get_tzid (zone);
+	icalcomp = icaltimezone_get_component (zone);
+	if (!icalcomp) {
+		e_calendar_remove_op (ecal, our_op);
+		g_mutex_unlock (our_op->mutex);
+		e_calendar_free_op (our_op);
+
+		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_INVALID_ARG, error);
+	}
+
+	/* convert icaltimezone into a string */	
+	tzobj = icalcomponent_as_ical_string (icalcomp);
 
 	/* call the backend */
 	CORBA_exception_init (&ev);
 
-	GNOME_Evolution_Calendar_Cal_setDefaultTimezone (priv->cal, tzid, &ev);
+	GNOME_Evolution_Calendar_Cal_setDefaultTimezone (priv->cal, tzobj, &ev);
 	if (BONOBO_EX (&ev)) {
 		e_calendar_remove_op (ecal, our_op);
 		g_mutex_unlock (our_op->mutex);
Index: libedata-cal/e-cal-backend-sync.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-cal-backend-sync.c,v
retrieving revision 1.20
diff -u -p -r1.20 e-cal-backend-sync.c
--- libedata-cal/e-cal-backend-sync.c	25 May 2006 03:54:41 -0000	1.20
+++ libedata-cal/e-cal-backend-sync.c	3 Jul 2006 07:16:54 -0000
@@ -517,6 +517,28 @@ e_cal_backend_sync_add_timezone (ECalBac
 }
 
 /**
+ * e_cal_backend_sync_set_default_zone:
+ * @backend: An ECalBackendSync object.
+ * @cal: An EDataCal object.
+ * @tz: Timezone object as string.
+ *
+ * Calls the set_default_timezone method on the given backend.
+ *
+ * Return value: Status code.
+ */
+ECalBackendSyncStatus
+e_cal_backend_sync_set_default_zone (ECalBackendSync *backend, EDataCal *cal, const char *tz)
+{
+ 	ECalBackendSyncStatus status;
+ 
+  	g_return_val_if_fail (E_IS_CAL_BACKEND_SYNC (backend), GNOME_Evolution_Calendar_OtherError);
+  
+ 	LOCK_WRAPPER (set_default_zone_sync, (backend, cal, tz));
+  
+ 	return status;
+}
+
+/**
  * e_cal_backend_sync_set_default_timezone:
  * @backend: An ECalBackendSync object.
  * @cal: An EDataCal object.
@@ -855,6 +877,16 @@ _e_cal_backend_add_timezone (ECalBackend
 }
 
 static void
+_e_cal_backend_set_default_zone (ECalBackend *backend, EDataCal *cal, const char *tz)
+{
+	ECalBackendSyncStatus status;
+
+	status = e_cal_backend_sync_set_default_zone (E_CAL_BACKEND_SYNC (backend), cal, tz);
+
+	e_data_cal_notify_default_timezone_set (cal, status);
+}
+
+static void
 _e_cal_backend_set_default_timezone (ECalBackend *backend, EDataCal *cal, const char *tzid)
 {
 	ECalBackendSyncStatus status;
@@ -961,6 +993,7 @@ e_cal_backend_sync_class_init (ECalBacke
 	backend_class->get_timezone = _e_cal_backend_get_timezone;
 	backend_class->add_timezone = _e_cal_backend_add_timezone;
 	backend_class->set_default_timezone = _e_cal_backend_set_default_timezone;
+	backend_class->set_default_zone = _e_cal_backend_set_default_zone;
  	backend_class->get_changes = _e_cal_backend_get_changes;
  	backend_class->get_free_busy = _e_cal_backend_get_free_busy;
 
Index: libedata-cal/e-cal-backend-sync.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-cal-backend-sync.h,v
retrieving revision 1.11
diff -u -p -r1.11 e-cal-backend-sync.h
--- libedata-cal/e-cal-backend-sync.h	11 Jul 2005 00:51:08 -0000	1.11
+++ libedata-cal/e-cal-backend-sync.h	3 Jul 2006 07:16:54 -0000
@@ -62,6 +62,7 @@ struct _ECalBackendSyncClass {
 	ECalBackendSyncStatus (*get_timezone_sync) (ECalBackendSync *backend, EDataCal *cal, const char *tzid, char **object);
 	ECalBackendSyncStatus (*add_timezone_sync) (ECalBackendSync *backend, EDataCal *cal, const char *tzobj);
 	ECalBackendSyncStatus (*set_default_timezone_sync) (ECalBackendSync *backend, EDataCal *cal, const char *tzid);
+	ECalBackendSyncStatus (*set_default_zone_sync) (ECalBackendSync *backend, EDataCal *cal, const char *tz);
 
 	ECalBackendSyncStatus (*get_changes_sync) (ECalBackendSync *backend, EDataCal *cal, const char *change_id, GList **adds, GList **modifies, GList **deletes);
 	ECalBackendSyncStatus (*get_freebusy_sync) (ECalBackendSync *backend, EDataCal *cal, GList *users, time_t start, time_t end, GList **freebusy);
@@ -152,6 +153,7 @@ ECalBackendSyncStatus e_cal_backend_sync
 ECalBackendSyncStatus e_cal_backend_sync_get_timezone (ECalBackendSync *backend, EDataCal *cal, const char *tzid, char **object);
 ECalBackendSyncStatus e_cal_backend_sync_add_timezone (ECalBackendSync *backend, EDataCal *cal, const char *tzobj);
 ECalBackendSyncStatus e_cal_backend_sync_set_default_timezone (ECalBackendSync *backend, EDataCal *cal, const char *tzid);
+ECalBackendSyncStatus e_cal_backend_sync_set_default_zone (ECalBackendSync *backend, EDataCal *cal, const char *tzobj);
 
 ECalBackendSyncStatus e_cal_backend_sync_get_changes (ECalBackendSync *backend, EDataCal *cal, const char *change_id, GList **adds, GList **modifies, GList **deletes);
 ECalBackendSyncStatus e_cal_backend_sync_get_free_busy (ECalBackendSync *backend, EDataCal *cal, GList *users, time_t start, time_t end, GList **freebusy);
Index: libedata-cal/e-cal-backend.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-cal-backend.c,v
retrieving revision 1.25
diff -u -p -r1.25 e-cal-backend.c
--- libedata-cal/e-cal-backend.c	22 Mar 2006 08:03:13 -0000	1.25
+++ libedata-cal/e-cal-backend.c	3 Jul 2006 07:16:54 -0000
@@ -997,6 +997,48 @@ e_cal_backend_get_timezone (ECalBackend 
 }
 
 /**
+ * e_cal_backend_set_default_zone:
+ * @backend: A calendar backend.
+ * @cal: An #EDataCal object.
+ * @tzobj: The timezone object, in a string.
+ * 
+ * Sets the default timezone for the calendar, which is used to resolve
+ * DATE and floating DATE-TIME values. 
+ * 
+ */
+void
+e_cal_backend_set_default_zone (ECalBackend *backend, EDataCal *cal, const char *tzobj)
+{
+	g_return_if_fail (backend != NULL);
+	g_return_if_fail (E_IS_CAL_BACKEND (backend));
+	g_return_if_fail (tzobj != NULL);
+
+	/* Old backends might be using the set_default_timezone */
+	if (CLASS (backend)->set_default_zone == NULL) {
+		icalcomponent *icalcomp = icalparser_parse_string (tzobj);
+		char *tzid = NULL;
+		icaltimezone *zone = icaltimezone_new ();
+
+		if (icalcomp) {
+			icaltimezone_set_component (zone, icalcomp);
+			tzid = icaltimezone_get_tzid (zone);
+		}
+
+		e_cal_backend_set_default_timezone (backend, cal, tzid ? tzid : "");
+
+		icaltimezone_free (zone, 1);
+
+		return;
+	}
+	/* fallback to old implementation if the set_zone is not implemented */
+	(* CLASS (backend)->set_default_zone) (backend, cal, tzobj);
+}
+
+/**
+ * @deprecated This virual function should not be used in the backends, use
+ * e_cal_backend_set_zone instead. This function restricts the default timezone
+ * to be libical builtin timezone.
+ *
  * e_cal_backend_set_default_timezone:
  * @backend: A calendar backend.
  * @cal: An #EDataCal object.
Index: libedata-cal/e-cal-backend.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-cal-backend.h,v
retrieving revision 1.17
diff -u -p -r1.17 e-cal-backend.h
--- libedata-cal/e-cal-backend.h	11 Oct 2005 07:56:21 -0000	1.17
+++ libedata-cal/e-cal-backend.h	3 Jul 2006 07:16:54 -0000
@@ -95,6 +95,7 @@ struct _ECalBackendClass {
 	/* Timezone related virtual methods */
 	void (* get_timezone) (ECalBackend *backend, EDataCal *cal, const char *tzid);
 	void (* add_timezone) (ECalBackend *backend, EDataCal *cal, const char *object);
+	void (* set_default_zone) (ECalBackend *backend, EDataCal *cal, const char *tzobj);
 	void (* set_default_timezone) (ECalBackend *backend, EDataCal *cal, const char *tzid);
 
 	void (* start_query) (ECalBackend *backend, EDataCalView *query);
@@ -157,6 +158,7 @@ void e_cal_backend_set_mode (ECalBackend
 void e_cal_backend_get_timezone (ECalBackend *backend, EDataCal *cal, const char *tzid);
 void e_cal_backend_add_timezone (ECalBackend *backend, EDataCal *cal, const char *object);
 void e_cal_backend_set_default_timezone (ECalBackend *backend, EDataCal *cal, const char *tzid);
+void e_cal_backend_set_default_zone (ECalBackend *backend, EDataCal *cal, const char *tzobj);
 
 void e_cal_backend_get_changes (ECalBackend *backend, EDataCal *cal, const char *change_id);
 void e_cal_backend_get_free_busy (ECalBackend *backend, EDataCal *cal, GList *users, time_t start, time_t end);
Index: libedata-cal/e-data-cal.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-data-cal.c,v
retrieving revision 1.19
diff -u -p -r1.19 e-data-cal.c
--- libedata-cal/e-data-cal.c	11 Oct 2005 07:56:21 -0000	1.19
+++ libedata-cal/e-data-cal.c	3 Jul 2006 07:16:54 -0000
@@ -467,7 +467,7 @@ impl_Cal_addTimezone (PortableServer_Ser
 /* Cal::setDefaultTimezone method */
 static void
 impl_Cal_setDefaultTimezone (PortableServer_Servant servant,
-			     const CORBA_char *tzid,
+			     const CORBA_char *tz,
 			     CORBA_Environment *ev)
 {
 	EDataCal *cal;
@@ -476,7 +476,7 @@ impl_Cal_setDefaultTimezone (PortableSer
 	cal = E_DATA_CAL (bonobo_object_from_servant (servant));
 	priv = cal->priv;
 
-	e_cal_backend_set_default_timezone (priv->backend, cal, tzid);
+	e_cal_backend_set_default_zone (priv->backend, cal, tz);
 }
 
 /**
