From c18b49e9925ed7ddd47b036df04e5d0e16077de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20=C3=85ne?= Date: Mon, 15 Aug 2016 21:30:16 +0200 Subject: [PATCH] Fix endless loop in AnimekveldActivity. --- src/pvv/side/social/animekveldactivity.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pvv/side/social/animekveldactivity.php b/src/pvv/side/social/animekveldactivity.php index 018512a..f2a10cd 100644 --- a/src/pvv/side/social/animekveldactivity.php +++ b/src/pvv/side/social/animekveldactivity.php @@ -8,7 +8,7 @@ class AnimekveldActivity { public function nextDate(DateTimeImmutable $date) { if ($date->format('H') > 20 || $date->format('H') == 19 && $date->format('i') > 30) - return $this->nextDate($date->add(new DateInterval('P1D'))); + return $this->nextDate($date->add(new DateInterval('P1D'))->setTime(19, 30, 0)); $date = $date->setTime(19, 30, 0); if ($date->format('N') != 5) return $this->nextDate($date->add(new DateInterval('P1D'))); @@ -17,7 +17,7 @@ class AnimekveldActivity { public function prevDate(DateTimeImmutable $date) { if ($date->format('H') < 19 || $date->format('H') == 20 && $date->format('i') < 30) - return $this->prevDate($date->sub(new DateInterval('P1D'))); + return $this->prevDate($date->sub(new DateInterval('P1D'))->setTime(19, 30, 0)); $date = $date->setTime(19, 30, 0); if ($date->format('N') != 5) return $this->prevDate($date->sub(new DateInterval('P1D')));