public function readDateTime()
    {
        try {
            $timeStamp = current(unpack('l', $this->getStream()->read(4)));
            $date = new DateTime('now', new \DateTimeZone('UTC'));

            return $date->setTimestamp($timeStamp);
        } catch (StreamException $e) {
            $this->handleStreamException($e, BinaryStreamAccessException::DATETIME);
        }
    }
public function readDateTime()
    {
        try {
            $timeStamp = current(unpack('l', $this->getStream()->read(4)));
            $date = new DateTime('now', new \DateTimeZone('UTC'));

            return $date->setTimestamp($timeStamp);
        } catch (StreamException $e) {
            $this->handleStreamException($e, BinaryStreamAccessException::DATETIME);
        }
    }
public function readDateTime ( ) { try { $ timeStamp = current ( unpack ( 'l' , $ this -> getStream ( ) -> read ( 4 ) ) ) ; $ date = new DateTime ( 'now' , new \ DateTimeZone ( 'UTC' ) ) ; return $ date -> setTimestamp ( $ timeStamp ) ; } catch ( StreamException $ e ) { $ this -> handleStreamException ( $ e , BinaryStreamAccessException :: DATETIME ) ; } }
Read a DateTime from the current binary stream.

@return \DateTime A DateTime object.
@throws \qtism\common\storage\BinaryStreamAccessException
Read a DateTime from the current binary stream .