Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
u01jmg3 committed Jul 17, 2019
1 parent 14c2057 commit 6394837
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ICal/ICal.php
Original file line number Diff line number Diff line change
Expand Up @@ -1175,16 +1175,17 @@ public function iCalDateWithTimeZone(array $event, $key, $format = self::DATE_TI
if ($key === 'DURATION') {
$dateTime = $this->parseDuration($event['DTSTART'], $dateArray[2], null);
} else {
// When constructing from a Unix Timestamp, no timezone needs passing.
// When constructing from a Unix Timestamp, no time zone needs passing.
$dateTime = new \DateTime('@' . $dateArray[2]);
}

// Set the timezone we wish to use when running `$dateTime->format`.
// Set the time zone we wish to use when running `$dateTime->format`.
$dateTime->setTimezone(new \DateTimeZone($this->calendarTimeZone()));

if (is_null($format)) {
return $dateTime;
}

return $dateTime->format($format);
}

Expand Down Expand Up @@ -2706,7 +2707,6 @@ protected function fileOrUrl($filename)

/**
* Returns a `DateTimeZone` object based on a string containing a time zone name.
*
* Falls back to the default time zone if string passed not a recognised time zone.
*
* @param string $timeZoneString
Expand Down

0 comments on commit 6394837

Please sign in to comment.