You are here

public function Twig_Extension_Core::setTimezone in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/lib/Twig/Extension/Core.php \Twig_Extension_Core::setTimezone()

Sets the default timezone to be used by the date filter.

Parameters

DateTimeZone|string $timezone The default timezone string or a DateTimeZone object:

File

vendor/twig/twig/lib/Twig/Extension/Core.php, line 76

Class

Twig_Extension_Core

Code

public function setTimezone($timezone) {
  $this->timezone = $timezone instanceof DateTimeZone ? $timezone : new DateTimeZone($timezone);
}