コード例 #1
0
 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;
     }
 }
コード例 #2
0
 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);
 }
コード例 #3
0
ファイル: InstallUtilTest.php プロジェクト: youprofit/Zurmo
 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);
 }