[Pkg-owncloud-commits] [php-sabre-vobject] 21/43: passing timezone of timeRange request to EventIterator and actually setting given timezone in EventIterator

David Prévot taffit at moszumanska.debian.org
Sat Sep 5 15:23:49 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag 4.0.0-alpha2
in repository php-sabre-vobject.

commit 7e0b7f28268636635e7f3bbc773915970994965c
Author: Armin Hackmann <armin at fruux.com>
Date:   Wed Jul 29 11:00:46 2015 +0200

    passing timezone of timeRange request to EventIterator and actually setting given timezone in EventIterator
---
 lib/Component/VEvent.php    | 2 +-
 lib/Recur/EventIterator.php | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/Component/VEvent.php b/lib/Component/VEvent.php
index 8353184..3b3c69b 100644
--- a/lib/Component/VEvent.php
+++ b/lib/Component/VEvent.php
@@ -32,7 +32,7 @@ class VEvent extends VObject\Component {
     function isInTimeRange(DateTimeInterface $start, DateTimeInterface $end) {
 
         if ($this->RRULE) {
-            $it = new EventIterator($this);
+            $it = new EventIterator($this, null, $start->getTimezone());
             $it->fastForward($start);
 
             // We fast-forwarded to a spot where the end-time of the
diff --git a/lib/Recur/EventIterator.php b/lib/Recur/EventIterator.php
index 45ab4eb..547a47a 100644
--- a/lib/Recur/EventIterator.php
+++ b/lib/Recur/EventIterator.php
@@ -92,7 +92,7 @@ class EventIterator implements \Iterator {
      */
     function __construct($input, $uid = null, DateTimeZone $timeZone = null) {
 
-        if (is_null($this->timeZone)) {
+        if (is_null($timeZone)) {
             $timeZone = new DateTimeZone('UTC');
         }
         $this->timeZone = $timeZone;

-- 
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