protected function checkService() { $allPassed = false; if (InstallUtil::checkPhpTimezoneSetting()) { $this->message = Zurmo::t('InstallModule', 'PHP date.timezone is set.'); return true; } else { $this->message = Zurmo::t('InstallModule', 'PHP date.timezone is not set.'); return true; } }
public function testCheckPhpTimezoneSetting() { $oldValue = ini_get('date.timezone'); // PHP issues warning that its not safe to rely on system's timezone settings and hence the "@" below. @ini_set('date.timezone', ''); $this->assertFalse(InstallUtil::checkPhpTimezoneSetting()); ini_set('date.timezone', 'EST'); $this->assertTrue(InstallUtil::checkPhpTimezoneSetting()); ini_set('date.timezone', $oldValue); }
public function testCheckPhpTimezoneSetting() { $oldValue = ini_get('date.timezone'); ini_set('date.timezone', ''); $this->assertFalse(InstallUtil::checkPhpTimezoneSetting()); ini_set('date.timezone', 'EST'); $this->assertTrue(InstallUtil::checkPhpTimezoneSetting()); ini_set('date.timezone', $oldValue); }