formatted time and +2 hours
This commit is contained in:
parent
42bef1c8bb
commit
7583831f21
1 changed files with 4 additions and 2 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue