You are here

public function Twig_Extension_Core::getTimezone in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 vendor/Twig/Extension/Core.php \Twig_Extension_Core::getTimezone()

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

Return value

DateTimeZone The default timezone currently in use

File

vendor/Twig/Extension/Core.php, line 86

Class

Twig_Extension_Core

Code

public function getTimezone() {
  if (null === $this->timezone) {
    $this->timezone = new DateTimeZone(date_default_timezone_get());
  }
  return $this->timezone;
}