You are here

public function Twig_Extension_Core::setTimezone in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 vendor/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/Extension/Core.php, line 76

Class

Twig_Extension_Core

Code

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