Skip to content

Commit

Permalink
Implementation of nextcloud#12885. Removed the workaround for nextclo…
Browse files Browse the repository at this point in the history
…ud/3rdparty#191.

Signed-off-by: hdijkema <hans@dykema.nl>
  • Loading branch information
hdijkema committed Dec 18, 2018
1 parent 546480e commit 1f8b6c5
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,32 +257,6 @@ public function schedule(Message $iTipMessage) {
#);
#$message->attach($attachment);

# The plain text text/calendar part is added to the code, but we need
# to do something more. Outlook (2010 and 2016 tested) has problems with canceled messages
# that contain Time Zone Identifications (e.g. ;TZID=Europe/Amsterdam:).
# A 'not-supported-calendar-message.ics' is shown and the cancellation is not recognized.
#
# See e.g.: https://stackoverflow.com/questions/48550054/icalendar-appointment-is-a-not-supported-calendar-message-ics
#
# To work around this problem, DTSTART and DTEND are converted to UTC.
# UTC date/times work in all situations.

$utc_tz = new \DateTimeZone("UTC");

$cvt_dtstart = $start;
$cvt_dtstart_dt = $cvt_dtstart->getDateTime();
$dtstart_ts = $cvt_dtstart_dt->getTimestamp();
$cvt_dtstart_dt = new \DateTime("now", $utc_tz);
$cvt_dtstart_dt->setTimestamp($dtstart_ts);
$cvt_dtstart->setDateTime($cvt_dtstart_dt, false);

$cvt_dtend = $end;
$cvt_dtend_dt = $cvt_dtend->getDateTime();
$dtend_ts = $cvt_dtend_dt->getTimestamp();
$cvt_dtend_dt = new \DateTime("now", $utc_tz);
$cvt_dtend_dt->setTimestamp($dtend_ts);
$cvt_dtend->setDateTime($cvt_dtend_dt, false);

$itip_msg = $iTipMessage->message->serialize();
$message->addPart(
$itip_msg,
Expand Down

0 comments on commit 1f8b6c5

Please sign in to comment.