src/In2pire/Compiler/Component/Git.php
public function getLastCommitDate()
    {
        $process = new Process('git log -n1 --pretty=%ci HEAD', $this->directory);

        if ($process->run() != 0) {
            throw new \RuntimeException('Can\'t run git log. You must ensure that git binary is available.');
        }

        $date = new \DateTime(trim($process->getOutput()));
        $date->setTimezone(new \DateTimeZone('UTC'));

        return $date->format('Y-m-d H:i:s');
    }
public function getLastCommitDate()
    {
        $process = new Process('git log -n1 --pretty=%ci HEAD', $this->directory);

        if ($process->run() != 0) {
            throw new \RuntimeException('Can\'t run git log. You must ensure that git binary is available.');
        }

        $date = new \DateTime(trim($process->getOutput()));
        $date->setTimezone(new \DateTimeZone('UTC'));

        return $date->format('Y-m-d H:i:s');
    }
public function getLastCommitDate ( ) { $ process = new Process ( 'git log -n1 --pretty=%ci HEAD' , $ this -> directory ) ; if ( $ process -> run ( ) != 0 ) { throw new \ RuntimeException ( 'Can\'t run git log. You must ensure that git binary is available.' ) ; } $ date = new \ DateTime ( trim ( $ process -> getOutput ( ) ) ) ; $ date -> setTimezone ( new \ DateTimeZone ( 'UTC' ) ) ; return $ date -> format ( 'Y-m-d H:i:s' ) ; }
Get last commit date in repository.

@return string
Date.
Get last commit date in repository .