if (!$_CONF['have_pear']) { $curPHPIncludePath = get_include_path(); if (empty($curPHPIncludePath)) { $curPHPIncludePath = $_CONF['path_pear']; } else { $curPHPIncludePath = $_CONF['path_pear'] . PATH_SEPARATOR . $curPHPIncludePath; } if (set_include_path($curPHPIncludePath) === false) { COM_errorLog('set_include_path failed - there may be problems using the PEAR classes.', 1); } } /** * Set the webserver's timezone */ require_once $_CONF['path_system'] . 'classes/timezoneconfig.class.php'; TimeZoneConfig::setSystemTimeZone(); /** * Include plugin class. * This is a poorly implemented class that was not very well thought out. * Still very necessary * */ require_once $_CONF['path_system'] . 'lib-plugins.php'; /** * Include page time -- used to time how fast each page was created * */ require_once $_CONF['path_system'] . 'classes/timer.class.php'; $_PAGE_TIMER = new timerobject(); $_PAGE_TIMER->startTimer(); /**
protected function setUp() { TimeZoneConfig::setSystemTimeZone(); $this->c = new Calendar(); }
/** * Set the user's preferred timezone * * Note that it does nothing if $_CONF['timezone'] is empty, i.e. if no * system timezone is defined, we don't set a user timezone either. * * @return void * @static * */ public static function setUserTimeZone() { global $_CONF; if (!empty($_CONF['timezone'])) { $tz = TimeZoneConfig::getUserTimeZone(); if (!empty($tz)) { TimeZoneConfig::setSystemTimeZone($tz); } } }