I have problem in converting time which I got from speed and distance, here's my code;
$dist = 30; // Distance which is in kilometres(km)
// speed is in knots(kt), if I take speed of 40kt and convert it into kilometres(km/h) ... 40 * 1.852 = 74.08
$time = ($dist / 74.08) / 24;
// result is 0.016873650107991 which is correct, but my problem is how can this be format in H:m:s,
// tried with date('h:m:s', strtotime($time) but result is always 01:01:00 no mater the distance
echo $time;
Any ideas how to format the time into H:m:s or improve this code? I have search the stack but did not found similar problem, if I missed sorry for duplication, but link is more than welcome.