Fix wrong due dates on group/project issues list refactor
What does this MR do and why?
This MR fixes wrong due dates on the group/project issues list refactor (#322755 (closed)).
Some due dates were converted to JS Date objects from a
string like new Date('2022-02-28')
. However, if the OS has
a time zone such as Pacific Standard Time, then the Date
object has a value of Sun Feb 27 2022 16:00:00 GMT-0800
.
The day 27 is then shown on the UI instead of the correct
day 28.
Screenshots or screen recordings
before | after | |
---|---|---|
issue sidebar due date | ||
issues list due date | ||
milestones sidebar due date | ||
issues list milestone due date |
How to set up and validate locally
- In rails console enable the feature flag
Feature.enable(:vue_issues_list)
- Change your OS time zone to Pacific Standard Time
- Visit any group or project issues list page such as
http://127.0.0.1:3000/h5bp/html5-boilerplate/-/issues
- Test the MR
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #353943 (closed)
Edited by Coung Ngo