private static function timestampToDate($time = null)
    {
        $time = $time ?? time();
        $time = self::formatTime($time);
        $dateTime = new \DateTime();
        $dateTime->setTimestamp($time);

        return $dateTime->format('d-m-Y H:i:s');
    }
private static function timestampToDate($time = null)
    {
        $time = $time ?? time();
        $time = self::formatTime($time);
        $dateTime = new \DateTime();
        $dateTime->setTimestamp($time);

        return $dateTime->format('d-m-Y H:i:s');
    }
private static function timestampToDate ( $ time = null ) { $ time = $ time ?? time ( ) ; $ time = self :: formatTime ( $ time ) ; $ dateTime = new \ DateTime ( ) ; $ dateTime -> setTimestamp ( $ time ) ; return $ dateTime -> format ( 'd-m-Y H:i:s' ) ; }
Converts a timestamp to DateTime.

@param int|string $time Datetime, Timestamp or English textual datetime (http://php.net/manual/en/function.strtotime.php)

@since 3.0.0

@return string
Converts a timestamp to DateTime .