Skip to content

Commit

Permalink
execution time ms bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Andygrond committed Jan 30, 2024
1 parent 31bc8b9 commit fe683b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/JsonLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ public function serverInfo(): array
// get ISO request time
protected function time(): string
{
[$sec, $msec] = explode('.', $_SERVER["REQUEST_TIME_FLOAT"]);
return date('Y-m-d\TH:i:s.', $sec) .$msec;
$tfloat = $_SERVER["REQUEST_TIME_FLOAT"];
$sec = floor($tfloat);
$msec = (string) round($tfloat - $sec, 3);
return date('Y-m-d\TH:i:s.', $sec) .substr($msec, 2);
}

// get general agent info
Expand Down

0 comments on commit fe683b2

Please sign in to comment.