From 7e395c5616749f7565579eb89294e177f3ecea57 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Thu, 27 Feb 2025 22:20:03 +0100 Subject: [PATCH] Fix timestamps for create and update action The browser strips the timezone indicator to use the datetime picker, so the server needs to add this back again. --- app/api/events/actions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/api/events/actions.ts b/app/api/events/actions.ts index e95ba8a..cbf0d34 100644 --- a/app/api/events/actions.ts +++ b/app/api/events/actions.ts @@ -18,8 +18,8 @@ export async function createEvent(formData: FormData) { slots: [ { id: `${id}-1`, - start, - end, + start: start + "Z", + end: end + "Z", locations: [location], } ] @@ -47,8 +47,8 @@ export async function modifyEvent(formData: FormData) { slots: [ { id: `${id}-1`, - start, - end, + start: start + "Z", + end: end + "Z", locations: [location], } ]