1
0

Datum vom ersten Datenpunkt im Test nehmen; Startseite hübscher

This commit is contained in:
Anna Christina Naß
2025-07-15 17:45:51 +02:00
parent 3db8f20f27
commit fdc2eb6c07
4 changed files with 12 additions and 7 deletions

View File

@@ -63,7 +63,9 @@ function test_finished() {
or die(return_error(500, 'connect Datenbankfehler: ' . pg_last_error()));
$query = "INSERT INTO tests VALUES (DEFAULT, $1, $2) RETURNING id";
$values = [ date('Y-m-d H:i:s'), json_encode($data) ];
$date = $data['test']['data']['temperatureSamples'][0]['time'];
$values = [ $date, json_encode($data) ];
$rc = pg_query_params($dbconn, $query, $values);