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

48 times of event do not display correct times #99

Merged
merged 43 commits into from
Sep 11, 2024

Conversation

christianhelp
Copy link
Collaborator

@christianhelp christianhelp commented Aug 17, 2024

Why

As of now, the time of an event does not reflect correctly due to issues with how the time is converted from the server.

What

  • Add helpers to leverage the use of Vercel headers to get a user's timezone that is sent to the server upon request of a server component
  • Added a types folder
  • Updated schedules display in order to properly show the times of an event accurately from any timezone

Satisifes

Fixes https://linear.app/acmutsa/issue/HK-122/times-of-event-do-not-display-correct-times
#48

NOTE

There were concerns on the approach to solve this issue as the page that uses the timezone headers will run on the edge. By definition and our knowledge, this should mean that it would not work in a production environment. However, upon doing a bit more research, it seems that these headers were made for the edge network. The developer with concerns has been assigned to approve this PR.

Resources are linked here:
X-Vercel-ip-timezone
Vercel Discussion where request seems to stem from

@christianhelp christianhelp linked an issue Aug 17, 2024 that may be closed by this pull request
Copy link

vercel bot commented Aug 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hack-kit-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 11, 2024 5:00am

Copy link
Member

@Lermatroid Lermatroid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some feedback. Overall great PR! Very much was something in need of a fix so cheers all around for the research / implementation.

Comments mostly revolve overall on what imo is over-obscuring of functionality or not obscuring it in what I would argue is a healthy way for the developers first laying eyes on it w/ some explanations of my reasoning & external sources.

apps/web/src/lib/utils/client/shared.ts Show resolved Hide resolved
apps/web/src/lib/queries/events.ts Outdated Show resolved Hide resolved
apps/web/src/lib/constants/shared.ts Outdated Show resolved Hide resolved
packages/db/schema.ts Show resolved Hide resolved
@christianhelp
Copy link
Collaborator Author

Ok starting review! Just a heads up though its not that the headers are on the edge or not work in production. It does work in Vercel production and preview environments, but not on non-vercel platforms / edge. TLDR: vendor lock-in for people who do not want to host on vercel 👍

I agree and I can think of a better way to handle this later on. However, for now I believe we should stick with this unless there is a better idea.

@Lermatroid
Copy link
Member

Ok starting review! Just a heads up though its not that the headers are on the edge or not work in production. It does work in Vercel production and preview environments, but not on non-vercel platforms / edge. TLDR: vendor lock-in for people who do not want to host on vercel 👍

I agree and I can think of a better way to handle this later on. However, for now I believe we should stick with this unless there is a better idea.

100%. Just was adding context to the PR 👍

@christianhelp christianhelp dismissed Lermatroid’s stale review September 11, 2024 05:02

Made requested changes.

@christianhelp christianhelp merged commit 129c195 into dev Sep 11, 2024
3 checks passed
@christianhelp christianhelp deleted the 48-times-of-event-do-not-display-correct-times branch September 11, 2024 05:58
joshuasilva414 added a commit to acmutsa/RowdyDatathon24 that referenced this pull request Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Times of Event do not display correct times
3 participants