Skip to content

Don't set default timezone to UTC for users

Summary

With !66493 (merged), we started showing time on user's profile based on user-selected timezone;

image

However, until users set a correct timezone for themselves via Profile Edit page, we default the timezone to GitLab Instance timezone (see app/models/user_preference.rb#L26), so this would lead to other users seeing an incorrect time for users who have not manually set any timezone yet.

Proposal

We have two alternatives to this problem;

  • Short-term solution: Set default timezone to an empty string, and hide the time on profile page as long as the user has not set any time.
  • Long-term solution: Follow the previous solution of setting default timezone to an empty string, and on the user profile page, show a link saying Set default timezone pointing to edit profile page for current user who has no timezone set.