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: Set timezone for end time and dynamically calculate event end #179

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

shfc
Copy link
Contributor

@shfc shfc commented Aug 21, 2024

Description

The event status doesn't update correctly from upcoming to past because the event dates were being parsed with the incorrect timezone (default UTC) and the event end time was calculated outside the component, preventing updates after the initial render.

Changes Made

  • Updated the getEventDate function to correctly parse and convert event dates to the ACST timezone using luxon.
  • The event filtering logic is replaced inside the Events component, ensuring these values are recalculated on each render.
  • Added a comment in events.ts to specify that all event times are in ACST.

Related Issues

Fixes #177

Additional Notes

N/A

src/app/events/Events.tsx Show resolved Hide resolved
Copy link
Member

@jsun969 jsun969 left a comment

Choose a reason for hiding this comment

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

LGTM

@phoenixpereira phoenixpereira merged commit c8058dd into compsci-adl:main Aug 22, 2024
3 checks passed
@shfc shfc deleted the fix/event-time branch August 22, 2024 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug] Fix time being UTC instead of ACST
4 participants