Index: calendar/ChangeLog
===================================================================
--- calendar/ChangeLog	(revision 9610)
+++ calendar/ChangeLog	(working copy)
@@ -1,3 +1,17 @@
+2008-09-26  Milan Crha  <mcrha@redhat.com>
+
+	** Fix for bug #360813
+
+	* backends/file/e-cal-backend-file.c:
+	(e_cal_backend_file_create_object),
+	(e_cal_backend_file_modify_object),
+	(e_cal_backend_file_receive_objects):
+	* backends/groupwise/e-cal-backend-groupwise-utils.c:
+	(e_gw_item_to_cal_component):
+	* backends/caldav/e-cal-backend-caldav.c: (caldav_create_object),
+	(caldav_modify_object), (process_object):
+	RFC 2445 - CREATED/DTSTAMP/LAST-MODIFIED always in UTC.
+
 2008-09-24  Ross Burton  <ross@linux.intel.com>
 
 	* libecal/libecal.pc.in:
Index: calendar/backends/file/e-cal-backend-file.c
===================================================================
--- calendar/backends/file/e-cal-backend-file.c	(revision 9610)
+++ calendar/backends/file/e-cal-backend-file.c	(working copy)
@@ -1857,7 +1857,7 @@ e_cal_backend_file_create_object (ECalBa
 	e_cal_component_set_icalcomponent (comp, icalcomp);
 
 	/* Set the created and last modified times on the component */
-	current = icaltime_from_timet (time (NULL), 0);
+	current = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
 	e_cal_component_set_created (comp, &current);
 	e_cal_component_set_last_modified (comp, &current);
 
@@ -1963,7 +1963,7 @@ e_cal_backend_file_modify_object (ECalBa
 	e_cal_component_set_icalcomponent (comp, icalcomp);
 
 	/* Set the last modified time on the component */
-	current = icaltime_from_timet (time (NULL), 0);
+	current = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
 	e_cal_component_set_last_modified (comp, &current);
 
 	/* sanitize the component*/
@@ -2567,7 +2567,7 @@ e_cal_backend_file_receive_objects (ECal
 		e_cal_component_set_icalcomponent (comp, subcomp);
 
 		/* Set the created and last modified times on the component */
-		current = icaltime_from_timet (time (NULL), 0);
+		current = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
 		e_cal_component_set_created (comp, &current);
 		e_cal_component_set_last_modified (comp, &current);
 
Index: calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
===================================================================
--- calendar/backends/groupwise/e-cal-backend-groupwise-utils.c	(revision 9610)
+++ calendar/backends/groupwise/e-cal-backend-groupwise-utils.c	(working copy)
@@ -1086,18 +1086,13 @@ e_gw_item_to_cal_component (EGwItem *ite
 	t = e_gw_item_get_creation_date (item);
 	if (t) {
 		itt_utc = icaltime_from_string (t);
-		if (!icaltime_get_timezone (itt_utc))
-			icaltime_set_timezone (&itt_utc, icaltimezone_get_utc_timezone());
-		if (default_zone) {
-			itt = icaltime_convert_to_zone (itt_utc, default_zone);
-			icaltime_set_timezone (&itt, default_zone);
-			e_cal_component_set_created (comp, &itt);
-			e_cal_component_set_dtstamp (comp, &itt);
 
-		} else {
-			e_cal_component_set_created (comp, &itt_utc);
-			e_cal_component_set_dtstamp (comp, &itt_utc);
-		}
+		/* RFC 2445 - CREATED/DTSTAMP/LAST-MODIFIED always in UTC */
+		icaltimezone_convert_time (&itt_utc, (icaltimezone*) icaltime_get_timezone (itt_utc), icaltimezone_get_utc_timezone ());
+		icaltime_set_timezone (&itt_utc, icaltimezone_get_utc_timezone ());
+
+		e_cal_component_set_created (comp, &itt_utc);
+		e_cal_component_set_dtstamp (comp, &itt_utc);
 	}
 
 	/* categories */
Index: calendar/backends/caldav/e-cal-backend-caldav.c
===================================================================
--- calendar/backends/caldav/e-cal-backend-caldav.c	(revision 9610)
+++ calendar/backends/caldav/e-cal-backend-caldav.c	(working copy)
@@ -1840,7 +1840,7 @@ caldav_create_object (ECalBackendSync  *
 	}
 
 	/* Set the created and last modified times on the component */
-	current = icaltime_from_timet (time (NULL), 0);
+	current = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
 	e_cal_component_set_created (comp, &current);
 	e_cal_component_set_last_modified (comp, &current);
 
@@ -1923,7 +1923,7 @@ caldav_modify_object (ECalBackendSync  *
 	}
 
 	/* Set the last modified time on the component */
-	current = icaltime_from_timet (time (NULL), 0);
+	current = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
 	e_cal_component_set_last_modified (comp, &current);
 
 	/* sanitize the component*/
@@ -2131,7 +2131,7 @@ process_object (ECalBackendCalDAV   *cbd
 	backend = E_CAL_BACKEND (cbdav);
 
 	/* ctime, mtime */
-	now = icaltime_from_timet (time (NULL), 0);
+	now = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
 	e_cal_component_set_created (ecomp, &now);
 	e_cal_component_set_last_modified (ecomp, &now);
 
