From bed9ab48e774731eccd3bc95494df51cab09cdad Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Thu, 2 Jul 2026 19:54:03 -0400 Subject: [PATCH] Fix manual time entries storing with wrong timezone --- app/Http/Requests/TimeEntryStoreRequest.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Http/Requests/TimeEntryStoreRequest.php b/app/Http/Requests/TimeEntryStoreRequest.php index 83b759d..ad055c4 100644 --- a/app/Http/Requests/TimeEntryStoreRequest.php +++ b/app/Http/Requests/TimeEntryStoreRequest.php @@ -43,8 +43,13 @@ public function rules(): array { */ public function passedValidation(): void { $this->merge([ - 'start' => $this->date('start')?->timezone(config('app.timezone')) ?? now(), - 'stop' => $this->date('stop')?->timezone(config('app.timezone')), + 'start' => ($this->date('start')?->timezone(config('app.timezone')) ?? now())->toISOString(true), + 'stop' => $this->date('stop')?->timezone(config('app.timezone'))?->toISOString(true), ]); + + $this->validator->setData(array_merge($this->validator->getData(), [ + 'start' => $this->input('start'), + 'stop' => $this->input('stop'), + ])); } }