-
Notifications
You must be signed in to change notification settings - Fork 1
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
Close submissions #72
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed with @Pabl0cks about this in Telegram.
We have to be careful with timezones (and check if the dates
methods are returning always UTC, or if in some instances it'll return the server / client timezone and then the check won't work correctly). The code is also using new Date()
and Date.now()
Two options (since we have to close in 30 min)
- We remove all the deadline checks and we just merged a closed version
- We leave the
NEXT_PUBLIC_SUBMISSION_DEADLINE
var empty (which will assume is closed)
To ensure nothing will fail with date checks on different environments, changed to When we change the repo to make it forkable and maybe hold more hackathons in the same platform, we can change the implementation to a date check, or store the status of each hackathon 🙏 |
Fixes #71
Used an ENV var to manage when the submission deadline, so we can know if the period is open or closed. Was not needed for us (we can merge at the exact end date) but it may be nice to have it for the generic version of the Hackathons platform.
If the ENV var doesn't exists or is not a valid date, I'm assuming the submission period is closed for security (not opening submissions by accident while configuring the hackathon).
If submission period is over:
In our case, we should set this in Vercel:
NEXT_PUBLIC_SUBMISSION_DEADLINE="2024-09-03T11:59:59Z"