src/LocalTime.php
public static function ofSecondOfDay(int $secondOfDay, int $nanoOfSecond = 0) : LocalTime
    {
        Field\SecondOfDay::check($secondOfDay);
        Field\NanoOfSecond::check($nanoOfSecond);

        $hours = \intdiv($secondOfDay, self::SECONDS_PER_HOUR);
        $secondOfDay -= $hours * self::SECONDS_PER_HOUR;
        $minutes = \intdiv($secondOfDay, self::SECONDS_PER_MINUTE);
        $secondOfDay -= $minutes * self::SECONDS_PER_MINUTE;

        return new LocalTime($hours, $minutes, $secondOfDay, $nanoOfSecond);
    }
public static function ofSecondOfDay(int $secondOfDay, int $nanoOfSecond = 0) : LocalTime
    {
        Field\SecondOfDay::check($secondOfDay);
        Field\NanoOfSecond::check($nanoOfSecond);

        $hours = \intdiv($secondOfDay, self::SECONDS_PER_HOUR);
        $secondOfDay -= $hours * self::SECONDS_PER_HOUR;
        $minutes = \intdiv($secondOfDay, self::SECONDS_PER_MINUTE);
        $secondOfDay -= $minutes * self::SECONDS_PER_MINUTE;

        return new LocalTime($hours, $minutes, $secondOfDay, $nanoOfSecond);
    }
public static function ofSecondOfDay ( int $ secondOfDay , int $ nanoOfSecond = 0 ) : LocalTime { Field \ SecondOfDay :: check ( $ secondOfDay ) ; Field \ NanoOfSecond :: check ( $ nanoOfSecond ) ; $ hours = \ intdiv ( $ secondOfDay , self :: SECONDS_PER_HOUR ) ; $ secondOfDay -= $ hours * self :: SECONDS_PER_HOUR ; $ minutes = \ intdiv ( $ secondOfDay , self :: SECONDS_PER_MINUTE ) ; $ secondOfDay -= $ minutes * self :: SECONDS_PER_MINUTE ; return new LocalTime ( $ hours , $ minutes , $ secondOfDay , $ nanoOfSecond ) ; }
Creates a LocalTime instance from a number of seconds since midnight.

@param int $secondOfDay  The second-of-day, from 0 to 86,399.
@param int $nanoOfSecond The nano-of-second, from 0 to 999,999,999.

@return LocalTime

@throws DateTimeException
Creates a LocalTime instance from a number of seconds since midnight .