From a71566918207deca8f711437329be4f115ac0bf5 Mon Sep 17 00:00:00 2001 From: Anael Closson Date: Thu, 6 Sep 2012 15:55:04 +0200 Subject: [PATCH] [FIX] OPW 576692 : Exported timezones were not specified, and CalDAV clients like mozilla lightning recognize timezone as local instead of UTC. The timezone modificator is now included in the serialized caldav event without timezone change (instead of not being added to the time part of date fields), and should be recognized by caldav clients as UTC. Step to reproduce : * install caldav module * configure software (for example mozilla lightning) to synchronize via caldav * add events * synchronize the external calendar software buggy results : time values are UTC equivalent of local time instead of being local time patch results : time values are the same as shown on OpenERP calendar bzr revid: acl@openerp.com-20120906135504-ya8jgub4sfu30lyb --- addons/caldav/calendar.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/caldav/calendar.py b/addons/caldav/calendar.py index 94d28e4ad37..ce054b5bebf 100644 --- a/addons/caldav/calendar.py +++ b/addons/caldav/calendar.py @@ -447,8 +447,9 @@ class CalDAV(object): dtfield.params['TZID'] = [tzval.title()] dtfield.value = self.format_date_tz(parser.parse(data[map_field]), tzval.title()) else: + dtfield.params['TZID'] = ['UTC'] dtfield.value = parser.parse(data[map_field]) - + elif map_type == 'utc'and data[map_field]: if tzval: local = pytz.timezone (tzval.title())