Date displayed in the wrong language in Stash

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 31, 2014

Everything in our Stash server is in English, except for the dates. All dates displayed on the stash web interface are in the local language.

We are running Stash on Windows Server. The language of the OS is English and in the "Regional and Language" settings everything is set to US/English except for the time zone and the location (the System locale is US/English).

What setting do I need to change to make the dates appear in English like everything else?

2 answers

1 accepted

0 votes
Answer accepted
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 4, 2014

Hi Balazs,

Unfortunately, the internationalization support that we've added in Stash 3.0 doesn't cover dates yet. I've created https://jira.atlassian.com/browse/STASH-4828to address this.

Stash uses the default locale to format dates and times. To change the formatting, update the "Date and time settings" for the Stash user on windows:

Log in as your stash user, open the Control Panel and go into "Change date, time or number formats" and select the date format you'd like. Hit "Ok" and restart the service.

If you're running Stash as a windows service, make sure to update the date and time settings for that user. If Stash is running as "local system", you'll have to update the settings for the system account. This page explains how to do that.

Note: answer edited after discussion below. The original answer suggested to add -Duser.language=en -Duser.region=US to the JVM_SUPPORT_RECOMMENDED_ARGS variable in STASH_INST/bin/setenv.bat (or sh). This only works correctly on Linux, not on Windows.

Thanks to Balasz for providing the link on how to update the date and time settings for the system account.

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 5, 2014

On the live server (2.12.1) ,after setting the (system) environment variable and restarting the service, the dates are still in the local language instead of English.

Same happens on the test server (3.0.4).

Tried setting the environment variable both to "%JAVA_OPTS% -Duser.language=en -Duser.region=US" and " -Duser.language=en -Duser.region=US". (Previously there was no variable like this, so the 1st one should be incorrect.)

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 5, 2014

Also tried (only on the test server) setting an env. var. called JVM_SUPPORT_RECOMMENDED_ARGS to "-Duser.language=en -Duser.region=US", both with and without the quotes. This also seems to have no effect.

Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 5, 2014

Balasz,

I' had tested the -Duser.language=en -Duser.region=US flags on Linux, assuming they would work on the same on Windows. Lesson learned: assume nothing.

I've just tested another approach on Windows that worked for me. Since you're running Stash as a service, the date/time settings of that user are applied to the process.

Log in as your stash user, open the Control Panel and go into "Change date, time or number formats" and select the date format you'd like. Hit "Ok" and restart the service.

Can you try that approach? If it works, I'll update my answer above.

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 5, 2014

The service is running as "local system", I need to figure out how to change the date format for this "user". Will get back to you.

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 5, 2014

This page shows how to change this setting for the system account and afterwards, the dates are in the desired language.

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 5, 2014

Is there a way to get rid of the relative dates and always show absolute instead?

BTW before the change, the relative dates (x days ago) were in English but the absolute ones were in the local language. You might want to address that.

Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 5, 2014

Thanks for that Balazs. As part of https://jira.atlassian.com/browse/STASH-4828we'll ensure that the relative and the absolute dates respect the user's locale.

There currently is no way to get rid of the relative dates, but there is an open feature request for it: https://jira.atlassian.com/browse/STASH-4477.

0 votes
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 4, 2014

Update: changing the location to and English-speaking country does not solve the problem.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events