[Pkg-owncloud-commits] [php-sabre-vobject] 276/341: modify DTEND for all-day events to make sure DTEND is considered non inclusive
David Prévot
taffit at moszumanska.debian.org
Tue Aug 11 13:35:56 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabre-vobject.
commit aa7e231f5e3bae14afa98b0e2b28722db74c3e31
Author: Armin Hackmann <armin at fruux.com>
Date: Tue Jun 9 15:04:20 2015 +0200
modify DTEND for all-day events to make sure DTEND is considered non inclusive
---
lib/Component/VEvent.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/Component/VEvent.php b/lib/Component/VEvent.php
index b82814e..3b0d31d 100644
--- a/lib/Component/VEvent.php
+++ b/lib/Component/VEvent.php
@@ -53,6 +53,9 @@ class VEvent extends VObject\Component {
// See:
// http://tools.ietf.org/html/rfc5545#page-54
$effectiveEnd = $this->DTEND->getDateTime();
+ if (!$this->DTEND->hasTime()) {
+ $effectiveEnd->modify('-1 second');
+ }
} elseif (isset($this->DURATION)) {
$effectiveEnd = clone $effectiveStart;
@@ -60,6 +63,7 @@ class VEvent extends VObject\Component {
} elseif (!$this->DTSTART->hasTime()) {
$effectiveEnd = clone $effectiveStart;
$effectiveEnd->modify('+1 day');
+ $effectiveEnd->modify('-1 second');
} else {
$effectiveEnd = clone $effectiveStart;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git
More information about the Pkg-owncloud-commits
mailing list