Timestamp Incorrect Due to Java Environment

その他

このページの内容

お困りですか?

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

コミュニティに質問

症状

If the Java Environment timezone is incorrect you will notice that timestamps within Stash are all off by the same amount of time in the logs, commits, comments, etc and differ form the system time of the Stash server. If a user hovers the cursor above the time a commit was made the time displayed is incorrect.

原因

Timezone is set incorrectly in Java environment.

ソリューション

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 <STASH_INSTALL>/bin directory at the following line:

For environment specific instruction such as Stash 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 Stash. 

After you have made the edit stop and restart Stash. 

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

最終更新日: 2016 年 2 月 23 日

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

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