From 051095174d0dfb604843a3b7e956a958ad12be91 Mon Sep 17 00:00:00 2001 From: Alex Fedorko Date: Sat, 23 May 2020 16:06:51 +0300 Subject: [PATCH] fix until param setting --- src/Recurr/Rule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Recurr/Rule.php b/src/Recurr/Rule.php index dfcf40f..a948774 100644 --- a/src/Recurr/Rule.php +++ b/src/Recurr/Rule.php @@ -360,7 +360,7 @@ public function loadFromArray($parts) if (isset($parts['UNTIL']) && isset($parts['COUNT'])) { throw new InvalidRRule('UNTIL and COUNT must not exist together in the same RRULE'); } elseif (isset($parts['UNTIL'])) { - $date = new \DateTime($parts['UNTIL']); + $date = new \DateTime($parts['UNTIL'], new \DateTimeZone('UTC')); $date = $date->setTimezone(new \DateTimeZone($this->getTimezone())); $this->setUntil($date); } elseif (isset($parts['COUNT'])) {