philly-js-club / philly-js-club-website

The website for Philly JS. Powered by React, Remix, and TypeScript. 🔔✨
https://phillyjs.com
MIT License
9 stars 17 forks source link

🐛 Bug: _index.tsx doesn't like like this date: 2024-11-14T18:00:00.000-05:00 - and not sure why.... #121

Closed jvoccia closed 3 weeks ago

jvoccia commented 1 month ago

Bug Report Checklist

Expected

EventDetails.tsx always outputs November 14 for this date: 2024-11-14T18:00:00.000-05:00 but when included in the _index.tsx file it throws a:

RangeError: Invalid time value
    at EventDetails (/home/runner/work/philly-js-club-website/philly-js-club-website/app/components/EventDetails.tsx:29:50)

Although I have been unable to reproduce it. Seems to only happen with wget on in GitHub Actions?

It also seems to work fine in the events.tsx page this only seems to be a problem in the _index.tsx page, which has some comments to the effect of - surely this assumption will not cause a problem in some of the date parsing code.

Also this seemed to be ok on Oct 10 - at that time both events were showing properly, but by Oct 11 (when the top event became this one) the error started occurring.

Note the date: 2024-11-14T18:00:00.000-04:00 - Which is the wrong time zone for November 14 ET - also had this issue.

As part of the fix remove the code from: EventDetails.tsx catch(...) which is hard coding November 14

Actual

Throws an error in GitHub Actions deployments.

Additional Info

No response