evolution-data-server r9944 - in trunk/calendar: . backends/caldav backends/file backends/groupwise
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9944 - in trunk/calendar: . backends/caldav backends/file backends/groupwise
- Date: Fri, 16 Jan 2009 11:43:33 +0000 (UTC)
Author: mcrha
Date: Fri Jan 16 11:43:33 2009
New Revision: 9944
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9944&view=rev
Log:
2009-01-16 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.
Modified:
trunk/calendar/ChangeLog
trunk/calendar/backends/caldav/e-cal-backend-caldav.c
trunk/calendar/backends/file/e-cal-backend-file.c
trunk/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
Modified: trunk/calendar/backends/caldav/e-cal-backend-caldav.c
==============================================================================
--- trunk/calendar/backends/caldav/e-cal-backend-caldav.c (original)
+++ trunk/calendar/backends/caldav/e-cal-backend-caldav.c Fri Jan 16 11:43:33 2009
@@ -2059,7 +2059,7 @@
}
/* 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, ¤t);
e_cal_component_set_last_modified (comp, ¤t);
@@ -2142,7 +2142,7 @@
}
/* 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, ¤t);
/* sanitize the component*/
@@ -2349,7 +2349,7 @@
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);
Modified: trunk/calendar/backends/file/e-cal-backend-file.c
==============================================================================
--- trunk/calendar/backends/file/e-cal-backend-file.c (original)
+++ trunk/calendar/backends/file/e-cal-backend-file.c Fri Jan 16 11:43:33 2009
@@ -1857,7 +1857,7 @@
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, ¤t);
e_cal_component_set_last_modified (comp, ¤t);
@@ -1963,7 +1963,7 @@
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, ¤t);
/* sanitize the component*/
@@ -2567,7 +2567,7 @@
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, ¤t);
e_cal_component_set_last_modified (comp, ¤t);
Modified: trunk/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
==============================================================================
--- trunk/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c (original)
+++ trunk/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c Fri Jan 16 11:43:33 2009
@@ -1085,18 +1085,13 @@
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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]