タイムゾーンを変更
- プラン: Free、Premium、Ultimate
- 提供形態: GitLab Self-Managed
ユーザーはプロフィールのタイムゾーンを設定できます。新規ユーザーにはデフォルトのタイムゾーンが設定されていないため、プロフィールに表示する前に明示的に設定する必要があります。GitLab.comでは、デフォルトのタイムゾーンはUTCです。
GitLabのデフォルトのタイムゾーンはUTCですが、好みに合わせて変更できます。
GitLabインスタンスのタイムゾーンを更新するには:
指定するタイムゾーンは、tz形式である必要があります。利用可能なタイムゾーンを確認するには、
timedatectlコマンドを使用します:timedatectl list-timezonesタイムゾーンを変更します(例:
America/New_York)。
/etc/gitlab/gitlab.rbを編集します:gitlab_rails['time_zone'] = 'America/New_York'ファイルを保存し、GitLabを再構成して再起動します:
sudo gitlab-ctl reconfigure sudo gitlab-ctl restart
Helmの値をエクスポートします:
helm get values gitlab > gitlab_values.yamlgitlab_values.yamlを編集します:global: time_zone: 'America/New_York'ファイルを保存して、新しい値を適用します:
helm upgrade -f gitlab_values.yaml gitlab gitlab/gitlab
docker-compose.ymlを編集します:version: "3.6" services: gitlab: environment: GITLAB_OMNIBUS_CONFIG: | gitlab_rails['time_zone'] = 'America/New_York'ファイルを保存して、GitLabを再起動します:
docker compose up -d
/home/git/gitlab/config/gitlab.ymlを編集します:production: &base gitlab: time_zone: 'America/New_York'ファイルを保存して、GitLabを再起動します:
# For systems running systemd sudo systemctl restart gitlab.target # For systems running SysV init sudo service gitlab restart