formatted time and +2 hours

This commit is contained in:
Thijs Stobbelaar 2023-11-16 16:25:16 +01:00
parent d450f7d7e1
commit 874592e9db

View file

@ -66,11 +66,13 @@ $lastMatches = array_slice($allMatches, 0, 8);
foreach ($lastMatches as $match) {
$matchid = $match['id'];
$date = new DateTime($match['createdAt']);
$date->modify('+2 hours');
$formattedDate = $date->format('m-d H:i:s');
echo "<tr>
<td><a href='matchinfo.php?matchid=$matchid'>" . $match['playername'] . "</a></td>
<td><a href='matchinfo.php?matchid=$matchid'>" . $match['createdAt'] . "</a></td>
<td><a href='matchinfo.php?matchid=$matchid'>" . $formattedDate . "</a></td>
<td><a href='matchinfo.php?matchid=$matchid'>" . $match['gameMode'] . "</a></td>
<td><a href='matchinfo.php?matchid=$matchid'>" . $match['matchType'] . "</a></td>
<td><a href='matchinfo.php?matchid=$matchid'>" . (isset($mapNames[$match['mapName']]) ? $mapNames[$match['mapName']] : $match['mapName']) . "</a></td>