Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Date formatting fails for EST #122

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 21 additions & 55 deletions app/components/EventDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,59 +23,25 @@ export function EventDetails({
day: "numeric",
month: "long",
});
try {
return (
<article className={`event-details medium event-details-${weight}`}>
<h3 className="event-details-date">{formatter.format(date)}</h3>
<p>{location}</p>
<ul className="event-details-topics">
{topics.map((topic) => (
<li className="event-details-topic" key={topic}>
{topic}
</li>
))}
</ul>
<a href={link} rel="noreferrer" target="_blank">
{linkText}
<Arrow
className="arrow-out"
label="External link indication arrow"
rotate={-45}
/>
</a>
</article>
);
} 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 (
<article className={`event-details medium event-details-${weight}`}>
<h3 className="event-details-date">November 14</h3>
<p>{location}</p>
<ul className="event-details-topics">
{topics.map((topic) => (
<li className="event-details-topic" key={topic}>
{topic}
</li>
))}
</ul>
<a href={link} rel="noreferrer" target="_blank">
{linkText}
<Arrow
className="arrow-out"
label="External link indication arrow"
rotate={-45}
/>
</a>
</article>
);
}
return (
<article className={`event-details medium event-details-${weight}`}>
<h3 className="event-details-date">{formatter.format(date)}</h3>
<p>{location}</p>
<ul className="event-details-topics">
{topics.map((topic) => (
<li className="event-details-topic" key={topic}>
{topic}
</li>
))}
</ul>
<a href={link} rel="noreferrer" target="_blank">
{linkText}
<Arrow
className="arrow-out"
label="External link indication arrow"
rotate={-45}
/>
</a>
</article>
);
}
2 changes: 1 addition & 1 deletion app/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export const site = {

export const region = {
locale: "en-US",
timeZone: "UTC",
timeZone: "America/New_York",
} as const;
Loading