From 7583831f2105375c5c9992d47166fd1717bca2b6 Mon Sep 17 00:00:00 2001 From: Lanta Date: Thu, 16 Nov 2023 16:25:16 +0100 Subject: [PATCH] formatted time and +2 hours --- index.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index aaa7ed9..6a722ba 100644 --- a/index.php +++ b/index.php @@ -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 " " . $match['playername'] . " - " . $match['createdAt'] . " + " . $formattedDate . " " . $match['gameMode'] . " " . $match['matchType'] . " " . (isset($mapNames[$match['mapName']]) ? $mapNames[$match['mapName']] : $match['mapName']) . "