File tree Expand file tree Collapse file tree
src/java/davmail/exchange/graph Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -236,9 +236,15 @@ public byte[] getEventContent() throws IOException {
236236 // set email on vcalendar object for shared calendars
237237 localVCalendar .setEmail (getCalendarEmail (folderPath ));
238238 // set timezone based on start date timezone
239- String originalStarttimezone = graphObject .optString ("originalStartTimeZone" );
240- if (originalStarttimezone != null ) {
241- localVCalendar .setTimezone (getVTimezone (originalStarttimezone ));
239+ String originalStartTimeZone = graphObject .optString ("originalStartTimeZone" );
240+ String originalEndTimeZone = graphObject .optString ("originalEndTimeZone" );
241+ if (originalStartTimeZone != null && !"tzone://Microsoft/Custom" .equals (originalStartTimeZone )) {
242+ localVCalendar .setTimezone (getVTimezone (originalStartTimeZone ));
243+ // mixed timezone event, append both VTIMEZONE objects
244+ if (originalEndTimeZone != null && !"tzone://Microsoft/Custom" .equals (originalEndTimeZone )
245+ && !originalEndTimeZone .equals (originalStartTimeZone )) {
246+ localVCalendar .setTimezone (getVTimezone (originalEndTimeZone ));
247+ }
242248 } else {
243249 localVCalendar .setTimezone (getVTimezone ());
244250 }
You can’t perform that action at this time.
0 commit comments