gitlab-org--gitlab-foss/doc/workflow/timezone.md

38 lines
1.3 KiB
Markdown
Raw Normal View History

# Changing your time zone
The global time zone configuration parameter can be changed in `config/gitlab.yml`:
2019-05-20 14:31:52 -04:00
2019-07-09 04:26:22 -04:00
```text
2019-05-20 14:31:52 -04:00
# time_zone: 'UTC'
```
2019-05-20 14:31:52 -04:00
Uncomment and customize if you want to change the default time zone of the GitLab application.
## Viewing available timezones
To see all available time zones, run `bundle exec rake time:zones:all`.
2019-05-20 14:31:52 -04:00
For Omnibus installations, run `gitlab-rake time:zones:all`.
NOTE: **Note:**
Currently, this rake task does not list timezones in TZInfo format required by GitLab Omnibus during a reconfigure: [#58672](https://gitlab.com/gitlab-org/gitlab-foss/issues/58672).
## Changing time zone in Omnibus installations
GitLab defaults its time zone to UTC. It has a global timezone configuration parameter in `/etc/gitlab/gitlab.rb`.
2019-05-20 14:31:52 -04:00
To obtain a list of timezones, log in to your GitLab application server and run a command that generates a list of timezones in TZInfo format for the server. For example, install `timedatectl` and run `timedatectl list-timezones`.
To update, add the timezone that best applies to your location. For example:
2019-07-09 04:26:22 -04:00
```ruby
gitlab_rails['time_zone'] = 'America/New_York'
```
2019-05-20 14:31:52 -04:00
After adding the configuration parameter, reconfigure and restart your GitLab instance:
2019-07-09 04:26:22 -04:00
```sh
gitlab-ctl reconfigure
gitlab-ctl restart
```