/** * Returns formated date according to current local and adds time offset * * @param string A date in ISO 8601 format or a unix time stamp * @param string format optional format for strftime * @returns string formated date * @see strftime */ public function format($config = array()) { $config = new KConfig($config); $config->append(array('gmt_offset' => self::getOffset())); // Joomla 1.6+ uses different date formats so DATE_FORMAT_LC1 is no longer usable if (version_compare(JVERSION, '1.6', '<')) { $config->append(array('format' => $this->translate('DATE_FORMAT_LC1'))); } return parent::format($config); }
/** * Returns formated date according to current local and adds time offset * * @param string A date in ISO 8601 format or a unix time stamp * @param string format optional format for strftime * @returns string formated date * @see strftime */ public function format($config = array()) { $config = new KConfig($config); $config->append(array( 'format' => JText::_('DATE_FORMAT_LC1'), 'gmt_offset' => KFactory::get('joomla:config')->getValue('config.offset') * 3600 )); return parent::format($config); }