From f8b52537181ec726f1c706eb927694662cd21969 Mon Sep 17 00:00:00 2001 From: mguessan Date: Wed, 24 Nov 2010 22:45:34 +0000 Subject: [PATCH] Caldav: Fix timezone support with Exchange 2010 SP1 git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1556 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/exchange/ews/EwsExchangeSession.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/java/davmail/exchange/ews/EwsExchangeSession.java b/src/java/davmail/exchange/ews/EwsExchangeSession.java index 4d29dc8b..574961be 100644 --- a/src/java/davmail/exchange/ews/EwsExchangeSession.java +++ b/src/java/davmail/exchange/ews/EwsExchangeSession.java @@ -1489,6 +1489,12 @@ public class EwsExchangeSession extends ExchangeSession { EWSMethod.Item item = new EWSMethod.Item(); item.type = "CalendarItem"; if ("Exchange2010".equals(serverVersion)) { + SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.ENGLISH); + dateFormatter.setTimeZone(GMT_TIMEZONE); + Calendar cal = Calendar.getInstance(); + item.put("Start", dateFormatter.format(cal.getTime())); + cal.add(Calendar.DAY_OF_MONTH, 1); + item.put("End", dateFormatter.format(cal.getTime())); item.put("StartTimeZone", timezoneId); } else { item.put("MeetingTimeZone", timezoneId);