Skip to content

[Frontend] - Fix assignment dates#634

Merged
thomasdejaeghere merged 1 commit intodevelopmentfrom
fix-assignment-dates
May 20, 2025
Merged

[Frontend] - Fix assignment dates#634
thomasdejaeghere merged 1 commit intodevelopmentfrom
fix-assignment-dates

Conversation

@LambrechtMaarten
Copy link
Contributor

  • When creating an assignment, the HTTP.post would automatically convert this to UTC. Because of this when a startDate/deadline was created at 00:00 in a time zone like Brussels with +2 hours. This date would be one day earlier at 22:00.
  • I fixed this by converting to date to noon (12:00) on that day, this way the UTC conversion does not change the day of the date.
  • This is a fix that can be done in a cleaner way, by working with Date objects in a more consistent way. But for now this should suffise because we don't store hours in our DB for startdates/deadlines

Copy link
Contributor

@bramcomyn bramcomyn left a comment

Choose a reason for hiding this comment

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

Good fix!

@thomasdejaeghere thomasdejaeghere merged commit a9d0fa3 into development May 20, 2025
2 checks passed
@thomasdejaeghere thomasdejaeghere deleted the fix-assignment-dates branch May 20, 2025 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants