Remove timezone conversion of issue due dates for issue board cards
This commit is contained in:
parent
c44c83c447
commit
2949479c67
|
@ -53,7 +53,7 @@ export default {
|
|||
} else if (timeDifference === -1) {
|
||||
return __('Yesterday');
|
||||
} else if (timeDifference > 0 && timeDifference < 7) {
|
||||
return dateFormat(issueDueDate, 'dddd', true);
|
||||
return dateFormat(issueDueDate, 'dddd');
|
||||
}
|
||||
|
||||
return standardDateFormat;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
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', () => {
|
|||
date.setDate(date.getDate() + 5);
|
||||
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', () => {
|
||||
|
@ -53,7 +53,7 @@ describe('Issue Due Date component', () => {
|
|||
const isDueInCurrentYear = today.getFullYear() === date.getFullYear();
|
||||
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', () => {
|
||||
|
|
Loading…
Reference in New Issue