From bed9ab48e774731eccd3bc95494df51cab09cdad Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Thu, 2 Jul 2026 19:54:03 -0400 Subject: [PATCH 1/2] 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'), + ])); } } From a08bbda499db7a3f74d1007059b4f5a90f413503 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 28 Sep 2026 15:16:24 -0400 Subject: [PATCH 2/2] Fix check for ongoing entries during manual creation --- app/Http/Controllers/VolunteerController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Http/Controllers/VolunteerController.php b/app/Http/Controllers/VolunteerController.php index 9b49b49..23083b4 100644 --- a/app/Http/Controllers/VolunteerController.php +++ b/app/Http/Controllers/VolunteerController.php @@ -93,8 +93,7 @@ public function checkOut(Request $request, TimeEntry $timeEntry): JsonResponse|R */ public function storeTimeEntry(TimeEntryStoreRequest $request, Event $event, User $user): JsonResponse { // Don't allow an ongoing entry to be created if there already is one - $input = $request->safe(); - if (!isset($input['stop'])) { + if (!$request->filled('stop')) { if ($user->timeEntries()->ongoing()->forEvent($event)->exists()) { return response()->json(['error' => 'User already has an ongoing time entry.'], 409); }