Bug #3535 » 3535-part1.patch
administrator/components/com_comprofiler/plugin.foundation.php | ||
---|---|---|
*
|
||
* @return string 'YYYY-MM-DD HH:mm:ss'
|
||
*/
|
||
function dateDbOfNow( ) {
|
||
return date( 'Y-m-d H:i:s', $this->now() - ( 3600 * $this->getCfg( 'offset' ) ) );
|
||
function dateDbOfNow( $time = true ) {
|
||
static $cache = array();
|
||
|
||
if ( $time ) {
|
||
$format = 'Y-m-d H:i:s';
|
||
} else {
|
||
$format = 'Y-m-d';
|
||
}
|
||
|
||
if ( ! isset( $cache[$format] ) ) {
|
||
if ( checkJversion() >= 2 ) {
|
||
$timezone = date_default_timezone_get();
|
||
|
||
date_default_timezone_set( 'UTC' );
|
||
|
||
$cache[$format] = date( $format );
|
||
|
||
date_default_timezone_set( $timezone );
|
||
} else {
|
||
$cache[$format] = date( $format, $this->now() - ( 3600 * $this->getCfg( 'offset' ) ) );
|
||
}
|
||
}
|
||
|
||
return $cache[$format];
|
||
}
|
||
function setPageTitle( $title ) {
|
||
if ( method_exists( $this->document->_cmsDoc, 'setTitle' ) ) {
|