From 93f8cd5196ff0a1dce854a55fe943fc1f37a0107 Mon Sep 17 00:00:00 2001 From: Dr Masroor Ehsan Date: Mon, 30 Dec 2024 15:06:38 +0600 Subject: [PATCH] FIX - sanitize time part --- app/Services/Pacs/DicomUtils.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Services/Pacs/DicomUtils.php b/app/Services/Pacs/DicomUtils.php index cecfbaf..89e5f21 100644 --- a/app/Services/Pacs/DicomUtils.php +++ b/app/Services/Pacs/DicomUtils.php @@ -3,6 +3,7 @@ namespace App\Services\Pacs; use Carbon\Carbon; +use Illuminate\Support\Str; final class DicomUtils { @@ -21,6 +22,6 @@ public static function dateTimeToCarbon(?string $datePart, ?string $timePart, st return null; } - return Carbon::createFromFormat('YmdHis.u', $datePart.$timePart, $timezone); + return Carbon::createFromFormat('YmdHis', $datePart.Str::before($timePart, '.'), $timezone); } }