Display selected timezone on user's profile
In https://gitlab.com/gitlab-org/gitlab/-/issues/15137 we added a timezone dropdown when editing your profile. The timezone is not yet displayed anywhere yet. We should display the timezone on the user's profile. | Before | After | | ------ | ------ | | ![Screen_Shot_2021-07-07_at_2.34.34_PM](https://gitlab.com/gitlab-org/gitlab/uploads/1a3edca8661bc0ae28f620fe5d907c41/Screen_Shot_2021-07-07_at_2.34.34_PM.png) | ![Screen_Shot_2021-07-07_at_2.39.54_PM](https://gitlab.com/gitlab-org/gitlab/uploads/f2995fb4bc8c9218af2289b79cd7a135/Screen_Shot_2021-07-07_at_2.39.54_PM.png) | ## Implementation plan 1. Create a `local_time` helper in [app/helpers/time_zone_helper.rb](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/helpers/time_zone_helper.rb) ```ruby def local_time(timezone) time_with_zone_instance = ActiveSupport::TimeZone.new(timezone).now offset = time_with_zone_instance.utc_offset formatted_offset = offset / 3600 time_with_zone_instance.strftime("%H:%M (UTC#{formatted_offset})") end ``` 2. Use that helper in [app/views/users/show.html.haml#L75](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/views/users/show.html.haml#L75) 3. Add a feature spec in [spec/features/users/show_spec.rb](https://gitlab.com/gitlab-org/gitlab/-/blob/master/spec/features/users/show_spec.rb)
issue