diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-06-21 13:35:20 +0400 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-06-21 13:35:58 +0400 |
commit | 37ed3b5bd20e516e9b99b024ff9d2ec0426fb1eb (patch) | |
tree | 464e675ac7893772aaf1b43f57419effda0dee0d | |
parent | 43674b1759bafb04c917aa11e10dbec6ccc6ed53 (diff) |
make edit event form work with DateTime Property UTC
-rw-r--r-- | apps/calendar/ajax/event/edit.form.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/calendar/ajax/event/edit.form.php b/apps/calendar/ajax/event/edit.form.php index f2ea84dd205..01939878893 100644 --- a/apps/calendar/ajax/event/edit.form.php +++ b/apps/calendar/ajax/event/edit.form.php @@ -27,6 +27,14 @@ $vevent = $object->VEVENT; $dtstart = $vevent->DTSTART; $dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent); switch($dtstart->getDateType()) { + case Sabre_VObject_Property_DateTime::UTC: + $timeOffset = OC_Calendar_App::$tz*60; + $newDT = $dtstart->getDateTime(); + $newDT->add(new DateInterval("PT" . $timeOffset . "M")); + $dtstart->setDateTime($newDT); + $newDT = $dtend->getDateTime(); + $newDT->add(new DateInterval("PT" . $timeOffset . "M")); + $dtend->setDateTime($newDT); case Sabre_VObject_Property_DateTime::LOCALTZ: case Sabre_VObject_Property_DateTime::LOCAL: $startdate = $dtstart->getDateTime()->format('d-m-Y'); |