how to change the date format?

Asked by Merlin on 2009-07-06

Hi,
I've just started wxBanker, and I have noticed immediately the date format is wrong. It is showing as mm/dd/yyyy when my system date format is dd/mm/yyyy. I have already set the currency to my local [AUD]. How can I change this?

Question information

Language:
English Edit question
Status:
Solved
For:
wxBanker Edit question
Assignee:
No assignee Edit question
Solved by:
Merlin
Solved:
2009-07-06
Last query:
2009-07-06
Last reply:
2009-07-06
Michael Rooney (mrooney) said : #1

Hi Merlin. Sounds like you are talking about https://bugs.launchpad.net/wxbanker/+bug/336997 ? The date picker controls should be using your locale format, but the date column of the transaction list is hard-coded to ISO format (YYYY-MM-DD). Hopefully I can get them all using the locale format soon.

The date picker controls should be showing your locale format though, what is your system locale name? Is it possible that locale encodes dates as MM-DD-YYYY? If you let me know the locale you are using from the list produced by running "locale -a" I can attempt to reproduce this and see what is going on there.

Merlin (merlin-zener) said : #2

I'm in Australia, so the date *should* be DD-MM-YYYY.
Here is the output from locale -a:

merlin@merlin-desktop:~$ locale -a
C
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_NG
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZW.utf8
POSIX
merlin@merlin-desktop:~$

Michael Rooney (mrooney) said : #3

Okay, it looks like then your default locale isn't en_AU.utf8, for some reason. If I run wxbanker from the command line such as "LC_ALL=en_AU.utf8 ./wxbanker.py" (replace ./wxbanker.py with just wxbanker if you have it installed on your system instead of running from source) then I do see it as DD-MM-YYYY instead of MM-DD-YYYY in my en_US locale. Does that work for you? By the way, which version of wxBanker are you running (you can find out in Help -> About)?

Merlin (merlin-zener) said : #4

Hi,
I am running 0.4.1.0
I just installed it from Applications>Add/Remove on Ubuntu 9.04.
It created a menu item under Applications/Office.

doing what you suggested didn't work; I guess I would have to know what directory it has been installed into...

merlin@merlin-desktop:~$ LC_ALL=en_AU.utf8 ./wxbanker
bash: ./wxbanker: No such file or directory
merlin@merlin-desktop:~$

Michael Rooney (mrooney) said : #5

Since you have it installed on your system, just do "LC_ALL=en_AU.utf8 wxbanker". Does that work?

Merlin (merlin-zener) said : #6

Hi,
well, it starts the program ok, but still it doesn't fix the date format problem.

Michael Rooney (mrooney) said : #7

Interesting. The dates in the transaction list in 0.4.1.0 are always going to be in MM-DD-YYYY format (as a result of the bug I linked, although in 0.5 and on I at least changed it to YYYY-MM-DD to resolve ambiguity), though the date picker for new transactions should definitely be using DD-MM-YYYY in that locale as I just tested it with 0.4.1.0.

So just to be sure, when explicitly running under en_AU locale, you should be seeing dates in the transaction list as MM-DD-YYYY and the date picker at the bottom in DD-MM-YYYY. If you do, then this is expected for that release. Upgrading to the latest stable release, 0.5, will among other things make the transaction list YYYY-MM-DD which is probably better, and hopefully in 0.6 they will all be the locale setting.

Does that help?

Merlin (merlin-zener) said : #8

Ah, yes.
That is exactly the behavior I am seeing - different formats in the list compared to the picker.

I'll leave it till 0.6, then.

Thanks for your time, and thoughts.