6

I am having a little bit of an issue trying to find where to change the GitLab timezone for my profile through the web UI.

Looking at some other posts and documentation which mentioned there was an option between Public email and Preferred language, this option I am unable to find under my profile settings.

Hopefully someone else has experienced the same issue, and found a solution to this, that could help point me in the right direction

Kodie
  • 103
  • 3
  • 9

2 Answers2

4

GitLab does not currently support specifying the timezone per-user. It is a global configuration for the entire GitLab server.

There was a merge request to add it (from July 2015), but it doesn't seem to have been accepted.

There was a similar question about this to the @gitlab Twitter account. The reply was:

No, the timezone settings are instance wide.

Mike Harris
  • 1,487
  • 13
  • 20
3

If this is not exposed by the GitLab UI, you would need to modify the GitLab configuration itself (config/gitlab.rb, or for Omnibus: /etc/gitlab/gitlab.rb).

See "Changing your time zone "

The global time zone configuration parameter can be changed in config/gitlab.yml:

# time_zone: 'UTC'

Uncomment and customize if you want to change the default time zone of GitLab application.

To see all available time zones, run bundle exec rake time:zones:all.

With Omnibus installations, run:

gitlab-rake time:zones:all`
# edit the timezone
gitlab-ctl reconfigure
gitlab-ctl restart

Note: since Sep. 2018, this has evolved:

See GitLab 14.2 (August 2021)

Display local time on user’s profile

Local time is now displayed on user profiles.

In previous releases, you could set the timezone but it was not visible throughout GitLab. This improvement is extremely helpful for distributed teams to help others know when others are likely to be available.

https://about.gitlab.com/images/14_2/tz_profile.png -- Display local time on user's profile

See Documentation and Issue.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    Excuse me. Where should I find the `config/gitlab.rb`? I don't have a clue. There is no `/etc/gitlab/gitlab.rb` in my laptop either. – ytu Feb 21 '19 at 03:38
  • @ytu I depends on how you have installed GitLab. In here, for instance: https://docs.gitlab.com/ce/install/structure.html, a `gitlab.yml` would be in `/home/git/gitlab/config`: `.yml`, not `.rb`, because that would not be an omnibus installation. – VonC Feb 21 '19 at 07:03
  • Thanks for your reply but I'm confused. I didn't install GitLab. I only use git and push commits on GitLab. Why does GitLab itself even need installation? – ytu Feb 21 '19 at 07:09
  • @ytu Because the question is about GitLab web UI, which suggests the OP has access to the GitLab server. – VonC Feb 21 '19 at 07:14
  • 1
    I could have misunderstood, but isn't the question about finding the timezone setting in personal profile on web UI? Whoever has a GitLab account can see that web UI. – ytu Feb 21 '19 at 07:31
  • 1
    @ytu Then that would not be available as a regular user. That would be modifiable only by a GitLab admin having access to the GitLab server and modifying the GitLab configuration file on said server. – VonC Feb 21 '19 at 07:40