public static function fromDate(\DateTime $date)
    {
        return new self($date->format('H'), $date->format('i'), $date->format('s'));
    }
public static function fromDate(\DateTime $date)
    {
        return new self($date->format('H'), $date->format('i'), $date->format('s'));
    }
public static function fromDate ( \ DateTime $ date ) { return new self ( $ date -> format ( 'H' ) , $ date -> format ( 'i' ) , $ date -> format ( 's' ) ) ; }
Creates a new time from a date.

@param \DateTime $date

@return Time
Creates a new time from a date .