summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKushal Pandya <kushalspandya@gmail.com>2019-03-06 07:45:17 +0000
committerKushal Pandya <kushalspandya@gmail.com>2019-03-06 07:45:17 +0000
commitec69b5245ee31753a754b2706a6988d2a412b22f (patch)
tree7a980f42b440b0264e49a5cf887cae51c9c38ed8
parent2fe1b807674b3ac2240b5b0d6375eeeeb464cd89 (diff)
parent2949479c67bf1058ad919452cfea6cadd52d4c41 (diff)
downloadgitlab-ce-ec69b5245ee31753a754b2706a6988d2a412b22f.tar.gz
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
-rw-r--r--app/assets/javascripts/boards/components/issue_due_date.vue2
-rw-r--r--changelogs/unreleased/56251-fix-issue-board-weekday-shift.yml5
-rw-r--r--spec/javascripts/boards/components/issue_due_date_spec.js4
3 files changed, 8 insertions, 3 deletions
diff --git a/app/assets/javascripts/boards/components/issue_due_date.vue b/app/assets/javascripts/boards/components/issue_due_date.vue
index 9c4c6632976..9bc66978198 100644
--- a/app/assets/javascripts/boards/components/issue_due_date.vue
+++ b/app/assets/javascripts/boards/components/issue_due_date.vue
@@ -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;
diff --git a/changelogs/unreleased/56251-fix-issue-board-weekday-shift.yml b/changelogs/unreleased/56251-fix-issue-board-weekday-shift.yml
new file mode 100644
index 00000000000..bedc488ebd4
--- /dev/null
+++ b/changelogs/unreleased/56251-fix-issue-board-weekday-shift.yml
@@ -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
diff --git a/spec/javascripts/boards/components/issue_due_date_spec.js b/spec/javascripts/boards/components/issue_due_date_spec.js
index 054cf8c5b7d..68e26b68f04 100644
--- a/spec/javascripts/boards/components/issue_due_date_spec.js
+++ b/spec/javascripts/boards/components/issue_due_date_spec.js
@@ -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', () => {