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

Use Pacific Time on server side #264

Merged
merged 1 commit into from
Sep 26, 2024
Merged

Use Pacific Time on server side #264

merged 1 commit into from
Sep 26, 2024

Conversation

SheepTester
Copy link
Member

@SheepTester SheepTester commented Sep 18, 2024

Info

image

4 am?? oops

Uses Pacific Time when displaying dates on server side only. The client continues to use local time.

Changes

It seems the Vercel servers are in a different time zone (maybe UTC?), so when displaying dates on the server side, I changed it to use the America/Los_Angeles time zone. This fixes the times rendered in event web previews. The client uses local time, like before.

An alternative option would be to force Pacific Time on the client. This could make sense since ACM at UCSD is based in California. However, we still host online events like Leetcode sessions, and people might be attending them from outside of California, so it would be helpful to continue showing them the event's time in their time zone.

Type of Change

  • Bug Fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as
    expected)
  • Logistics Change (A change to a README, description, or dev workflow setup like
    linting/formatting)
  • Continuous Integration Change (Related to deployment steps or continuous integration
    workflows)
  • Other: (Fill In)

Testing

I have tested that my changes fully resolve the linked issue ...

  • locally on Desktop.
  • on the live deployment preview on Desktop.
  • on the live deployment preview on Mobile.
  • I have added new Cypress tests that are passing.

Checklist

  • I have performed a self-review of my own code.
  • I have followed the style guidelines of this project.
  • I have documented any new functions in /src/lib/* and commented hard to understand areas
    anywhere else.
  • My changes produce no new warnings.

Screenshots

image

the event image says october 2 but i don't think that's my fault

Copy link

vercel bot commented Sep 18, 2024

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

Name Status Preview Comments Updated (UTC)
membership-portal-ui-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 18, 2024 3:52am
testing-membership-portal-ui-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 18, 2024 3:52am

Copy link
Contributor

@alexzhang1618 alexzhang1618 left a comment

Choose a reason for hiding this comment

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

LGTM, is it worth specifying that it's PST in these?

@SheepTester SheepTester merged commit 05d3c88 into main Sep 26, 2024
9 checks passed
@SheepTester SheepTester deleted the sean/fix-tz branch September 26, 2024 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants