Skip to content

Add timezone to snapshot view of gitlab user profile

The following page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

After adding #335459 (closed), user's selected timezone is now presented in the user profile. It would be nice to see this on the snapshot as well

Release notes

You can now see your local timezone on the snapshot view of a user profile when you hover over someone's name on an issue or merge request. This helps users better understand when to expect responses from you directly from comments using the without needing to navigate to the user's profile and increases team collaboration.

Problem to solve

User timezone is only reflected on the profile page amd should be reflected everywhere throughout GitLab

Proposal

Screen_Shot_2021-08-10_at_2.26.53_PM

Implementation plan

  1. Expose local_time to the API in lib/api/entities/user.rb
expose :local_time do |user|
  local_time(user.timezone)
end
  1. Pass localTime to the Vue component in app/assets/javascripts/user_popovers.js#L47
  2. Render the local time in app/assets/javascripts/vue_shared/components/user_popover/user_popover.vue#L96
  3. Update specs
Edited by 🤖 GitLab Bot 🤖