[Pkg-owncloud-commits] [php-sabre-vobject] 278/341: Simpler isInTimeRange check

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 1400411f026a29f9ab856bceeab2f360cb42bbca
Author: Dominik Tobschall <dominik at fruux.com>
Date:   Tue Jun 9 17:51:26 2015 +0200

    Simpler isInTimeRange check
---
 lib/Component/VEvent.php | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/Component/VEvent.php b/lib/Component/VEvent.php
index 114b95d..a1b4fe2 100644
--- a/lib/Component/VEvent.php
+++ b/lib/Component/VEvent.php
@@ -53,9 +53,6 @@ class VEvent extends VObject\Component {
             // See:
             // http://tools.ietf.org/html/rfc5545#page-54
             $effectiveEnd = $this->DTEND->getDateTime($end->getTimezone());
-            if (!$this->DTEND->hasTime()) {
-                $effectiveEnd->modify('-1 second');
-            }
 
         } elseif (isset($this->DURATION)) {
             $effectiveEnd = clone $effectiveStart;
@@ -63,12 +60,11 @@ class VEvent extends VObject\Component {
         } elseif (!$this->DTSTART->hasTime()) {
             $effectiveEnd = clone $effectiveStart;
             $effectiveEnd->modify('+1 day');
-            $effectiveEnd->modify('-1 second');
         } else {
             $effectiveEnd = clone $effectiveStart;
         }
         return (
-            ($start <= $effectiveEnd) && ($end > $effectiveStart)
+            ($start < $effectiveEnd) && ($end > $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