I would like to create a simple pace calculations table function in PHP.

When entering distance and time everything is calculated and created correctly, but the hours are displayed with +1. I tried to calculate the hours minus one (`$formatedPace = date('H:i:s', strtotime($paceSum. '-1 hour'));`) , but this did not work.

Where do I have my error here?

**Current Output:**
[![enter image description here](https://i.stack.imgur.com/6Wx7x.png)](https://i.stack.imgur.com/6Wx7x.png)

**Code:**

```
// example //
$distance = 14;
$hours = 01;
$minutes = 10;
$seconds = 00;
// example //

$totalMinutes = ($hours * 3600) + ($minutes * 60) + $seconds;
$pace = $totalMinutes / $distance;

for($distanceCount = 1; $distanceCount <= $distance; $distanceCount++) {
    $paceSum = $pace * $distanceCount;
    $formatedPace = date('H:i:s', $paceSum);

    echo '<tr>
            <td style="text-align: center">'.$distanceCount.' km</td>
            <td style="text-align: center">'.$formatedPace.'</td>
          </tr>';
}

```