From acd4823dac7b9f34f4077b4bd3ccf3bd0ebeb94e Mon Sep 17 00:00:00 2001 From: Trygve Date: Fri, 16 Feb 2024 21:26:46 +0100 Subject: [PATCH] =?UTF-8?q?Begynte=20p=C3=A5=20tabellproduskjon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- registrering.php | 2 +- upload.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/registrering.php b/registrering.php index d4419b8..0a03264 100644 --- a/registrering.php +++ b/registrering.php @@ -22,7 +22,7 @@ function register_runner(id) { let formData = new FormData(); formData.append(name= 'control', value=control); formData.append(name= 'id', value=id); - time = new Date(Date.now()).toISOString() + time = new Date(Date.now()).toISOString().split('.')[0]+"Z" formData.append('time', time); fetch("upload.php", { method: "POST", diff --git a/upload.php b/upload.php index 6598f1b..db2df82 100644 --- a/upload.php +++ b/upload.php @@ -4,5 +4,5 @@ $runner_id = $_POST['id']; $time = $_POST['time']; $file = 'passering.csv'; $current = file_get_contents($file); -$current .= $control . ", " . $runner_id . ", " . $time . "\n"; +$current .= $control . "," . $runner_id . "," . $time . "\n"; file_put_contents($file, $current); \ No newline at end of file