Date displayed in the wrong language in Stash

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

This widget could not be displayed.

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.

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.)

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.

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.

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.

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

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.

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.

This widget could not be displayed.

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,303 views 8 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you