diff options
-rw-r--r-- | modules-available/locationinfo/inc/icalparser.inc.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules-available/locationinfo/inc/icalparser.inc.php b/modules-available/locationinfo/inc/icalparser.inc.php index 15cd95c6..0be8777b 100644 --- a/modules-available/locationinfo/inc/icalparser.inc.php +++ b/modules-available/locationinfo/inc/icalparser.inc.php @@ -2019,7 +2019,7 @@ class ICalParser foreach (array_keys($subArray) as $key) { if ($key === 'TZID') { - $currentTimeZone = $this->timeZoneStringToDateTimeZone($subArray[$key]); + $currentTimeZone = $subArray[$key]; } elseif (is_numeric($key)) { $icalDate = $subArray[$key]; @@ -2027,7 +2027,7 @@ class ICalParser $currentTimeZone = self::TIME_ZONE_UTC; } - $output[] = new DateTimeImmutable($icalDate, $currentTimeZone); + $output[] = new DateTimeImmutable($icalDate, $this->timeZoneStringToDateTimeZone($currentTimeZone)); if ($key === $finalKey) { // Reset to default @@ -2070,6 +2070,8 @@ class ICalParser */ public function timeZoneStringToDateTimeZone($timeZoneString) { + if ($timeZoneString instanceof DateTimeZone) + return $timeZoneString; // Some time zones contain characters that are not permitted in param-texts, // but are within quoted texts. We need to remove the quotes as they're not // actually part of the time zone. |