Timestamp Incorrect in Bitbucket Server

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

Timestamps within Bitbucket Server are all off by the same amount of time in the logs, commits, comments, etc.  

原因

  1. Server's system time is set incorrectly.
  2. If the time differs form the system time of the Bitbucket Server instance, the timezone is set incorrectly in Java environment. For instance, a user hovers the cursor above the time a commit was made the time displayed does not match the server's system time
  3. .

ソリューション

症状 1

Correct the system time on your server.

症状 2 

The value of the timezone can be altered with the below JVM argument. The below example would be used to set it for America/Chicago:

-Duser.timezone=America/Chicago

(info) The List of TZ Database Time Zones documentation on Wikipedia contains further information on the different Timezones that can be set.

タイムゾーンの例

タイムゾーンコー​​ド
シドニーAustralia/Sydney
ロサンゼルスAmerica/Los_Angeles
ニューヨークAmerica/New_York
パリEurope/Paris
ローマEurope/Rome
UTCUTC
マドリードEurope/Madrid

Linux の場合

On Linux systems this parameter can be set in the setenv.sh file located in the <BITBUCKET_INSTALL>/bin directory at the following line:

Bitbucket Server 5.0+ では setenv と環境変数に変更があります

Bitbucket Server 5.0 以降では setenv.shsetenv.bat が取り除かれています。これらのファイルで設定されていたオプションは、環境変数で設定できるようになりました。環境変数の設定場所は、実行先のオペレーティング システムに応じます。

Linux

When using the atlbitbucket service on Linux, the environment variables are ignored. You must set the parameters in _start-webapp.sh (or start-bitbucket.sh). These values will be read when the service starts.

たとえば、 JVM_SUPPORT_RECOMMENDED_ARGS を設定するには、ファイルに次の行を追加します。

JVM_SUPPORT_RECOMMENDED_ARGS=-XX:+HeapDumpOnOutOfMemoryError

Windows

Bitbucket Server を実行しているユーザーで、パラメーターを環境変数として設定します。たとえば、JVM_SUPPORT_RECOMMENDED_ARGS を設定したい場合、それを環境変数として作成して適切な値を割り当てます。Bitbucket Server がスタートアップ スクリプトやサービスを利用して起動する際に、この値が取得および適用されます。

For environment specific instruction such as Bitbucket Server as a service or for windows users, refer to Setting Properties and Options on Startup. This Document is meant for JIRA, however it applies to Bitbucket Server. 

After you have made the edit stop and restart Bitbucket Server. 

You can verify the change has been made by checking <BITBUCKET_INSTALL>/logs/catalina.out and looking for the timestamp change between when you stopped and started Bitbucket Server. 

As of BitbucketServer 5.x+, no logs are written to the BITBUCKET_INSTALL directory. The contents of catalina.out will be written to BITBUCKET_HOME/log/atlassian-bitbucket.log file.

最終更新日 2017 年 5 月 4 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.