From 56031598700eaa5d52737beba85acd5e1696375d Mon Sep 17 00:00:00 2001 From: Jason Voccia Date: Thu, 31 Oct 2024 19:30:38 -0400 Subject: [PATCH] fix: Date formatting fails for EST --- app/components/EventDetails.tsx | 76 +++++++++------------------------ app/config.ts | 2 +- 2 files changed, 22 insertions(+), 56 deletions(-) diff --git a/app/components/EventDetails.tsx b/app/components/EventDetails.tsx index ed872fa..3567e6b 100644 --- a/app/components/EventDetails.tsx +++ b/app/components/EventDetails.tsx @@ -23,59 +23,25 @@ export function EventDetails({ day: "numeric", month: "long", }); - try { - return ( -
-

{formatter.format(date)}

-

{location}

- - - {linkText} - - -
- ); - } catch (ex) { - // Hacky fix to get website back up for some reason - // does not like the date string: 2024-11-14T18:00:00.000-05:00 - // I originally thought it might be the time zone -04 but that - // was not the case. - // after passed to new Date(string) in the - // home page even though this also happens on the - // events page and that is working fine. - // So hard coding for the moment until we - // can locate the reason the _index.tsx page - // is wonky... - return ( -
-

November 14

-

{location}

- - - {linkText} - - -
- ); - } + return ( +
+

{formatter.format(date)}

+

{location}

+ + + {linkText} + + +
+ ); } diff --git a/app/config.ts b/app/config.ts index a4d8fa2..c599d2c 100644 --- a/app/config.ts +++ b/app/config.ts @@ -9,5 +9,5 @@ export const site = { export const region = { locale: "en-US", - timeZone: "UTC", + timeZone: "America/New_York", } as const;