Remove timezone conversion of issue due dates for issue board cards

This commit is contained in:
Elias Werberich 2019-02-25 08:57:41 +01:00
parent c44c83c447
commit 2949479c67
No known key found for this signature in database
GPG Key ID: F6DD3413A7F973DE
3 changed files with 8 additions and 3 deletions

View File

@ -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;

View File

@ -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

View File

@ -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', () => {