src/Day/Time/TimeBuilder.php
public static function fromSeconds(int $seconds): Time
    {
        if ($seconds < 0 || $seconds > 86400) {
            throw new \InvalidArgumentException(\sprintf('Invalid time "%s".', $seconds));
        }

        $data = [
            'hours' => (int)($seconds / 3600),
            'minutes' => ($seconds / 60) % 60,
            'seconds' => $seconds % 60
        ];

        return self::fromArray($data);
    }
public static function fromSeconds(int $seconds): Time
    {
        if ($seconds < 0 || $seconds > 86400) {
            throw new \InvalidArgumentException(\sprintf('Invalid time "%s".', $seconds));
        }

        $data = [
            'hours' => (int)($seconds / 3600),
            'minutes' => ($seconds / 60) % 60,
            'seconds' => $seconds % 60
        ];

        return self::fromArray($data);
    }
Create a new time from seconds.

@param integer $seconds The seconds.
@return Time