public function Twig_Extension_Core::setTimezone in Translation template extractor 6.3
Same name and namespace in other branches
- 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
Code
public function setTimezone($timezone) {
$this->timezone = $timezone instanceof DateTimeZone ? $timezone : new DateTimeZone($timezone);
}