You are here

public function Twig_Extension_Core::getTimezone 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::getTimezone()

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

Return value

DateTimeZone The default timezone currently in use

File

vendor/twig/twig/lib/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;
}