Date format used in IDEA

How do i change the date format used in IDEA? In particular, in the
changes tool window.

I live in Australia but the date format is displayed in US format.
Eg. mm/dd/yyyy instead of dd/mm/yyyy

Regards

Peter

11 comments
Comment actions Permalink

Hello peter,

How do i change the date format used in IDEA? In particular, in the
changes tool window.

I live in Australia but the date format is displayed in US format. Eg.
mm/dd/yyyy instead of dd/mm/yyyy


The date format is based on your default locale. If your OS is configured
to use the Australian locale, it should be picked up in that place as well.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Hi Dmitry,

The date format is based on your default locale. If your OS is
configured to use the Australian locale, it should be picked up in that
place as well.


I should state that I am running IDEA on MAC OSX 10.5. As far as I can
tell, I have set the correct locale information in System Preferences.

Is there any way to see which locale IDEA is using? Is there a way I can
change this?

BTW, i'm using latest IDEA 8 EAP.

Thanks

Peter Vandoros

0
Comment actions Permalink

Peter,

You may try to put the following in your idea.properties file:
user.language=en
user.country=AU

Cheers,
--
Sergei

0
Comment actions Permalink

Sergei S. Ivanov wrote:

You may try to put the following in your idea.properties file:
user.language=en
user.country=AU


That didn't work :(

Regards

Peter

0
Comment actions Permalink

The "user.country" and "user.language" need to be passed into the JVM on start up. So you actually need to put those settings in the idea.exe.vmoptions file (in the {IDEA-install}/bin directory) as follows:


I just tested on my US based Windows PC and the dates in the Local History window were showing as dd/mm/yy rather than my usual mm/dd/yy. It should work on a Mac.

0
Comment actions Permalink

I just realized that being on a Mac, you won't have the idea.exe.vmoptions file. Just find the equivalent vmoptions file for the executable on the Mac (idea.sh.vmoptions maybe) and put it in there.

0
Comment actions Permalink

We have a similar issue in our applications, especially on my (US-?) English
Vista with a German date format (dd.MM.yyyy). By default, the dates are
shown in Java applications with the non-German format. Hence we made the
date format configurable, so I can use my preferred format yyyy-MM-dd - BTW,
what country has this as default?

Tom

0
Comment actions Permalink

Hello Mark,

I just realized that being on a Mac, you won't have the
idea.exe.vmoptions file. Just find the equivalent vmoptions file
for the executable on the Mac (idea.sh.vmoptions maybe) and put it
in there.


On Mac, the options are in info.plist

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Thanks Mark, that worked :) ... I had tried this but it looks like I
misspelled the user.country property.

The question now is, why isn't IDEA picking up my locale information
from my system?

Peter

0
Comment actions Permalink

The question now is, why isn't IDEA picking up my locale information
from my system?

Peter

I'd believe the actual question would be why isn't Java picking up the locale from the system. Since specifying the VM system property works, that shows that IDEA is (likely) using the standard Locale.getDefault() method (or something that in turn uses it). So for whatever reason Java isn't picking it up. You should be able to verify this by running the following program:



Run it without specifying the -Duser.country=AU -Duser.language=en, and then run it with those. If without the parameters it does not show en_AU, then you know its Java that is not picking up the locale. So your next step would be to determine if Java isn't picking it up (Java bug on the Mac maybe), or if your system isn't set correctly.

0
Comment actions Permalink

Thanks for your help Mark. I've solved the issue.

The issue was indeed a set up issue. I didn't realise the language
"English" meant English US. I didn't even know that other "English"
languages were available. This confused me as I didn't realise that I
had to specify Australia in each tab of the "International" preference
pane especially after specified Australia for the "Region" option under
the "Formats" tab.

It's very confusing. It shouldn't be this confusing.

Peter

0

Please sign in to leave a comment.