protected function _replaceTime($str) {
		if (!preg_match_all('/\[time(.*?)\](.*)\[\/time\]/i', $str, $matches)) {
			// Fallback regex for when no options are passed.
			if (!preg_match_all('/\[time(.*?)\](.[^\[]*)\[\/time\]/i', $str, $matches)) {
				return $str;
			}
		}

		foreach ($matches[0] as $i => $find) {
			$opts = $this->_extractAttributes(trim($matches[1][$i]));

			foreach (Hash::normalize(array('method' => 'nice', 'format', 'timezone')) as $k => $v) {
				${$k} = $v;
				if (isset($opts[$k])) {
					${$k} = $opts[$k];
					unset($opts[$k]);
				}
			}

			App::uses('CakeTime', 'Utility');

			$replace = (empty($matches[2][$i])) ? '' : CakeTime::$method($matches[2][$i], $timezone, $format);
			$str = str_replace($find, $replace, $str);
		}

		return $str;
	}