RealDevSquad / RealDevSquad/website-backend
Design Doc for the From and Until Timestamps fix for OOO
Open
@heyrandhirs is already working on this.
Since Oct 2, 2023.
- Dominant language
- JavaScript
- Stars
- 74
- Forks
- 276
- Avg merge
- 1d 26m
- Merged PRs (30d)
- 14
Description
Problem Statement
- As of now when a user selects OOO from
website-my, the timestamp is stored as the00:00:00 UTCtimestamp for the chosen date. - Problem arises when the user chooses to be on OOO for one day. Suppose a user chooses to be on OOO from
02/10/2023till02/10/2023, then both thefromanduntiltimestamps are chosen as the00:00:00 UTCtimestamps for both. In this case,1696204800000. - Hence, the
fromanduntiltimestamps become equal resulting in a OOO for 0 ms. This would cause problems when updating the OOO dates in the user's discord nickname. - With this issue, the
fromanduntiltimestamp for the day must be set to00:00:00 UTCand23:59:59 UTCrespectively.
Refer to the screenshot higlighting the issue
Solution
- As the from timestamp is correct i.e at UTC 00:00:00. We will need to convert the
totimestamp to respective time of the day at 23:59:59 UTC`. - This needs to be done at all the places where the user is being marked as OOO.
Issue Ticket : https://github.com/Real-Dev-Squad/website-backend/issues/1579
ETA Breakdown:
- Design Doc: 1 day
- Code Changes : 1 day
- Tests : 1 day
- Review+Buffer: 3 day
- Completion : 9th Oct 2023
Please feel free to add any comments if you have any suggestions / improvements.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.