Commit ec69b524 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'contribute/fix-issue-board-weekday-shift' into 'master'

Remove timezone conversion of issue due dates for issue board cards

Closes #56251

See merge request gitlab-org/gitlab-ce!25512
parents 2fe1b807 2949479c
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
} else if (timeDifference === -1) { } else if (timeDifference === -1) {
return __('Yesterday'); return __('Yesterday');
} else if (timeDifference > 0 && timeDifference < 7) { } else if (timeDifference > 0 && timeDifference < 7) {
return dateFormat(issueDueDate, 'dddd', true); return dateFormat(issueDueDate, 'dddd');
} }
return standardDateFormat; return standardDateFormat;
......
---
title: "Fix weekday shift in issue board cards for UTC+X timezones by removing local timezone to UTC conversion"
merge_request: 25512
author: Elias Werberich
type: fixed
...@@ -43,7 +43,7 @@ describe('Issue Due Date component', () => { ...@@ -43,7 +43,7 @@ describe('Issue Due Date component', () => {
date.setDate(date.getDate() + 5); date.setDate(date.getDate() + 5);
vm = createComponent(date); vm = createComponent(date);
expect(vm.$el.querySelector('time').textContent.trim()).toEqual(dateFormat(date, 'dddd', true)); expect(vm.$el.querySelector('time').textContent.trim()).toEqual(dateFormat(date, 'dddd'));
}); });
it('should render month and day for other dates', () => { it('should render month and day for other dates', () => {
...@@ -53,7 +53,7 @@ describe('Issue Due Date component', () => { ...@@ -53,7 +53,7 @@ describe('Issue Due Date component', () => {
const isDueInCurrentYear = today.getFullYear() === date.getFullYear(); const isDueInCurrentYear = today.getFullYear() === date.getFullYear();
const format = isDueInCurrentYear ? 'mmm d' : 'mmm d, yyyy'; const format = isDueInCurrentYear ? 'mmm d' : 'mmm d, yyyy';
expect(vm.$el.querySelector('time').textContent.trim()).toEqual(dateFormat(date, format, true)); expect(vm.$el.querySelector('time').textContent.trim()).toEqual(dateFormat(date, format));
}); });
it('should contain the correct `.text-danger` css class for overdue issue', () => { it('should contain the correct `.text-danger` css class for overdue issue', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment