fuel/fuel/core/classes/date.php
public function format($pattern_key = 'local', $timezone = null)
	{
		\Config::load('date', 'date');

		$pattern = \Config::get('date.patterns.'.$pattern_key, $pattern_key);

		// determine the timezone to switch to
		$timezone === true and $timezone = static::$display_timezone;
		is_string($timezone) or $timezone = $this->timezone;

		// Temporarily change timezone when different from default
		if (\Fuel::$timezone != $timezone)
		{
			date_default_timezone_set($timezone);
		}

		// Create output
		$output = strftime($pattern, $this->timestamp);

		// Change timezone back to default if changed previously
		if (\Fuel::$timezone != $timezone)
		{
			date_default_timezone_set(\Fuel::$timezone);
		}

		return $output;
	}
public function format($pattern_key = 'local', $timezone = null)
	{
		\Config::load('date', 'date');

		$pattern = \Config::get('date.patterns.'.$pattern_key, $pattern_key);

		// determine the timezone to switch to
		$timezone === true and $timezone = static::$display_timezone;
		is_string($timezone) or $timezone = $this->timezone;

		// Temporarily change timezone when different from default
		if (\Fuel::$timezone != $timezone)
		{
			date_default_timezone_set($timezone);
		}

		// Create output
		$output = strftime($pattern, $this->timestamp);

		// Change timezone back to default if changed previously
		if (\Fuel::$timezone != $timezone)
		{
			date_default_timezone_set(\Fuel::$timezone);
		}

		return $output;
	}
public function format ( $ pattern_key = 'local' , $ timezone = null ) { \ Config :: load ( 'date' , 'date' ) ; $ pattern = \ Config :: get ( 'date.patterns.' . $ pattern_key , $ pattern_key ) ; // determine the timezone to switch to $ timezone === true and $ timezone = static :: $ display_timezone ; is_string ( $ timezone ) or $ timezone = $ this -> timezone ; // Temporarily change timezone when different from default if ( \ Fuel :: $ timezone != $ timezone ) { date_default_timezone_set ( $ timezone ) ; } // Create output $ output = strftime ( $ pattern , $ this -> timestamp ) ; // Change timezone back to default if changed previously if ( \ Fuel :: $ timezone != $ timezone ) { date_default_timezone_set ( \ Fuel :: $ timezone ) ; } return $ output ; }
Returns the date formatted according to the current locale

@param   string	either a named pattern from date config file or a pattern, defaults to 'local'
@param   mixed 	vald timezone, or if true, output the time in local time instead of system time
@return  string
Returns the date formatted according to the current locale