From ff5c2aa379f8850597801deecff924518218ca27 Mon Sep 17 00:00:00 2001 From: sabine <6594573+sabine@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:54:34 +0200 Subject: [PATCH] fix: use RFC 3339 string for date conversion (#2782) --- src/ocamlorg_frontend/components/cards.eml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ocamlorg_frontend/components/cards.eml b/src/ocamlorg_frontend/components/cards.eml index 159fde0779..31bf24ff62 100644 --- a/src/ocamlorg_frontend/components/cards.eml +++ b/src/ocamlorg_frontend/components/cards.eml @@ -81,13 +81,13 @@ module Event = struct match date with | Some { yyyy_mm_dd; utc_hh_mm } -> (match utc_hh_mm with - | Some time -> yyyy_mm_dd ^ " " ^ time ^ " UTC" + | Some time -> yyyy_mm_dd ^ "T" ^ time ^ "Z" | None -> yyyy_mm_dd) | None -> "N/A" let format_date_req (date : Data.Event.utc_datetime) : string = match date.utc_hh_mm with - | Some time -> date.yyyy_mm_dd ^ " " ^ time ^ " UTC" + | Some time -> date.yyyy_mm_dd ^ "T" ^ time ^ "Z" | None -> date.yyyy_mm_dd let script = @@ -96,7 +96,7 @@ module Event = struct Alpine.store('dateUtils', { convertDate(dateString) { if (dateString === 'N/A') return dateString - const hasTime = dateString.includes('UTC'); + const hasTime = dateString.includes('Z'); const date = new Date(dateString); const options = hasTime ? { month: 'short',