Always show UTC dates for iteration start/due dates
What does this MR do?
Iteration start/due dates don't have a time - they are just a date string yyyy-mm-dd
. This meant users with subzero timezones (e.g. US Pacific time) got a timezone-adjusted date showing the previous day.
This adds the utc
parameter and passes it from places in Iterations.
How to test
For dev, requires the group_iterations
feature flag, an iteration created, and local timezone set to less than UTC
bin/rspec ee/spec/features/groups/iterations/user_views_iteration_spec.rb
diff --git a/ee/spec/features/groups/iterations/user_views_iteration_spec.rb b/ee/spec/features/groups/iterations/user_views_iteration_spec.rb
index d92ff13b15f..9b834e23eaf 100644
--- a/ee/spec/features/groups/iterations/user_views_iteration_spec.rb
+++ b/ee/spec/features/groups/iterations/user_views_iteration_spec.rb
@@ -18,6 +18,7 @@ RSpec.describe 'User views iteration' do
end
it 'shows iteration info and dates' do
+ live_debug
expect(page).to have_content(iteration.title)
expect(page).to have_content(iteration.description)
expect(page).to have_content(iteration.start_date.strftime('%b %-d, %Y'))
Screenshots
- Set system timezone to somewhere on the western half of the world
- Load iteration
- Compare date in graphql response with displayed date
Does this MR meet the acceptance criteria?
Closes #227286 (closed)
Edited by Simon Knox