time modify #126

Merged
OpzekerIT merged 5 commits from dev into main 2023-11-16 15:29:51 +00:00
3 changed files with 41 additions and 39 deletions

View file

@ -12,7 +12,5 @@
<meta property="og:title" content="DTCH CLAN"> <meta property="og:title" content="DTCH CLAN">
<meta property="og:description" content="DTCH CLAN STATS"> <meta property="og:description" content="DTCH CLAN STATS">
<meta property="og:image" content="https://dtch.online/images/logo.png"> <meta property="og:image" content="https://dtch.online/images/logo.png">
<script src="./lib/sorttable.js"></script> <script src="./lib/sorttable.js"></script>
</head> </head>

View file

@ -38,8 +38,8 @@ $lastMatches = array_slice($allMatches, 0, 8);
<table> <table>
<tr> <tr>
<!-- <th>Match Date</th> -->
<th>Player Name</th> <th>Player Name</th>
<th>Match Date</th>
<th>Mode</th> <th>Mode</th>
<th>Type</th> <th>Type</th>
<th>Map</th> <th>Map</th>
@ -66,9 +66,13 @@ $lastMatches = array_slice($allMatches, 0, 8);
foreach ($lastMatches as $match) { foreach ($lastMatches as $match) {
$matchid = $match['id']; $matchid = $match['id'];
$date = new DateTime($match['createdAt']);
$date->modify('+1 hours');
$formattedDate = $date->format('m-d H:i:s');
echo "<tr> echo "<tr>
<td><a href='matchinfo.php?matchid=$matchid'>" . $match['playername'] . "</a></td> <td><a href='matchinfo.php?matchid=$matchid'>" . $match['playername'] . "</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['gameMode'] . "</a></td>
<td><a href='matchinfo.php?matchid=$matchid'>" . $match['matchType'] . "</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> <td><a href='matchinfo.php?matchid=$matchid'>" . (isset($mapNames[$match['mapName']]) ? $mapNames[$match['mapName']] : $match['mapName']) . "</a></td>

View file

@ -67,7 +67,7 @@
} }
$date = new DateTime($match['createdAt']); $date = new DateTime($match['createdAt']);
$date->modify('+2 hours'); $date->modify('+1 hours');
$formattedDate = $date->format('m-d H:i:s'); $formattedDate = $date->format('m-d H:i:s');
$matchType = $match['matchType']; $matchType = $match['matchType'];