public function syncCommand($url = 'http://www.baidu.com')
    {
        $timestamp = $this->_getRemoteTimestamp($url);
        if ($timestamp === false) {
            return $this->console->error(['fetch remote timestamp failed: `:url`', 'url' => $url]);
        } else {
            $this->_updateDate($timestamp);
            $this->console->write(date('Y-m-d H:i:s'));
            return 0;
        }
    }
public function syncCommand($url = 'http://www.baidu.com')
    {
        $timestamp = $this->_getRemoteTimestamp($url);
        if ($timestamp === false) {
            return $this->console->error(['fetch remote timestamp failed: `:url`', 'url' => $url]);
        } else {
            $this->_updateDate($timestamp);
            $this->console->write(date('Y-m-d H:i:s'));
            return 0;
        }
    }
public function syncCommand ( $ url = 'http://www.baidu.com' ) { $ timestamp = $ this -> _getRemoteTimestamp ( $ url ) ; if ( $ timestamp === false ) { return $ this -> console -> error ( [ 'fetch remote timestamp failed: `:url`' , 'url' => $ url ] ) ; } else { $ this -> _updateDate ( $ timestamp ) ; $ this -> console -> write ( date ( 'Y-m-d H:i:s' ) ) ; return 0 ; } }
sync system time with http server time clock

@param string $url the time original

@return  int
sync system time with http server time clock