mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-14 03:32:22 -05:00
Caldav: additional patch for Outlook created recurring events
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@663 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
ed2e28afee
commit
5cb2c3e9b7
@ -1573,7 +1573,9 @@ public class ExchangeSession {
|
|||||||
hasAttendee = true;
|
hasAttendee = true;
|
||||||
} else if ("TRANSP".equals(key)) {
|
} else if ("TRANSP".equals(key)) {
|
||||||
transp = value;
|
transp = value;
|
||||||
} else if (line.startsWith("TZID:(GMT")) {
|
} else if (line.startsWith("TZID:(GMT") ||
|
||||||
|
// additional test for Outlook created recurring events
|
||||||
|
line.startsWith("TZID:GMT ")) {
|
||||||
try {
|
try {
|
||||||
validTimezoneId = ResourceBundle.getBundle("timezones").getString(value);
|
validTimezoneId = ResourceBundle.getBundle("timezones").getString(value);
|
||||||
} catch (MissingResourceException mre) {
|
} catch (MissingResourceException mre) {
|
||||||
@ -1602,7 +1604,7 @@ public class ExchangeSession {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// fix invalid exchange timezoneid
|
// fix invalid exchange timezoneid
|
||||||
if (validTimezoneId != null && line.indexOf(";TZID=\"") >= 0) {
|
if (validTimezoneId != null && line.indexOf(";TZID=") >= 0) {
|
||||||
line = fixTimezoneId(line, validTimezoneId);
|
line = fixTimezoneId(line, validTimezoneId);
|
||||||
}
|
}
|
||||||
if (!fromServer && currentAllDayState.isAllDay && "X-MICROSOFT-CDO-ALLDAYEVENT:FALSE".equals(line)) {
|
if (!fromServer && currentAllDayState.isAllDay && "X-MICROSOFT-CDO-ALLDAYEVENT:FALSE".equals(line)) {
|
||||||
@ -1674,10 +1676,10 @@ public class ExchangeSession {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected String fixTimezoneId(String line, String validTimezoneId) {
|
protected String fixTimezoneId(String line, String validTimezoneId) {
|
||||||
int startIndex = line.indexOf("TZID=\"");
|
int startIndex = line.indexOf("TZID=");
|
||||||
int endIndex = line.indexOf('"', startIndex + 6);
|
int endIndex = line.indexOf(':', startIndex + 5);
|
||||||
if (startIndex >= 0 && endIndex >= 0) {
|
if (startIndex >= 0 && endIndex >= 0) {
|
||||||
return line.substring(0, startIndex + 5) + validTimezoneId + line.substring(endIndex + 1);
|
return line.substring(0, startIndex + 5) + validTimezoneId + line.substring(endIndex);
|
||||||
} else {
|
} else {
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
|
@ -72,3 +72,4 @@
|
|||||||
(GMT-10.00)\ Hawaii=Pacific/Honolulu
|
(GMT-10.00)\ Hawaii=Pacific/Honolulu
|
||||||
(GMT-11.00)\ Midway Island/Samoa=Pacific/Pago_Pago
|
(GMT-11.00)\ Midway Island/Samoa=Pacific/Pago_Pago
|
||||||
(GMT-12.00)\ Eniwetok/Kwajalein/Dateline Time=Pacific/Kwajalein
|
(GMT-12.00)\ Eniwetok/Kwajalein/Dateline Time=Pacific/Kwajalein
|
||||||
|
GMT\ +0100\ (Standard)\ /\ GMT\ +0200\ (Daylight)=Europe/Paris
|
||||||
|
Loading…
Reference in New Issue
Block a user