src/LocalTime.php
public static function fromDateTime(\DateTimeInterface $dateTime) : LocalTime
    {
        return new LocalTime(
            (int) $dateTime->format('G'),
            (int) $dateTime->format('i'),
            (int) $dateTime->format('s'),
            1000 * (int) $dateTime->format('u')
        );
    }
public static function fromDateTime(\DateTimeInterface $dateTime) : LocalTime
    {
        return new LocalTime(
            (int) $dateTime->format('G'),
            (int) $dateTime->format('i'),
            (int) $dateTime->format('s'),
            1000 * (int) $dateTime->format('u')
        );
    }
public static function fromDateTime ( \ DateTimeInterface $ dateTime ) : LocalTime { return new LocalTime ( ( int ) $ dateTime -> format ( 'G' ) , ( int ) $ dateTime -> format ( 'i' ) , ( int ) $ dateTime -> format ( 's' ) , 1000 * ( int ) $ dateTime -> format ( 'u' ) ) ; }
Creates a LocalTime from a native DateTime or DateTimeImmutable object.

@param \DateTimeInterface $dateTime

@return LocalTime
Creates a LocalTime from a native DateTime or DateTimeImmutable object .