Bug 397245 - Cannot set date format properly in KMyMoney 5
Summary: Cannot set date format properly in KMyMoney 5
Status: RESOLVED UPSTREAM
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.0.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-07 16:34 UTC by schoenes-rad
Modified: 2020-12-05 10:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Output from System Profiler (343 bytes, text/plain)
2018-08-07 16:34 UTC, schoenes-rad
Details

Note You need to log in before you can comment on or make changes to this bug.
Description schoenes-rad 2018-08-07 16:34:09 UTC
Created attachment 114357 [details]
Output from System Profiler

Running Lubuntu 18.04.1 LTS .  My preferred system language is US English, my preferred date format is YYYY-MM-DD.  Closest locale combination thereof is en_DK which I have set in Language Support (as can be seen from the System Profiler output attached).

Before I changed the Regional Formats from German to English (Denmark), KMyMoney showed a date format of dd.mm.yy which I did not like.  After having changed it to the current setting, both PCManFM and Thunar file managers show the desired date format of yyyy-mm-dd .  However, KMyMoney has decided to show dd/mm/yyyy which is better than before but still not the desired format.

Please advise.

- nothing follows-
Comment 1 Thomas Baumgart 2020-12-05 10:30:40 UTC
Using LC_TIME=en_CA.utf8 gets what you want. Apparently, there is a difference in the display between the base system and what Qt provides. en_DK.utf8 is one example.

I have de_DE.utf8 as my default locale for time. The following table show what is going on. I start the programs either without providing a specific locale (default) or with specifically setting the LC_TIME variable in the environment starting the program.

LC_TIME      date +%x      KMyMoney
--------------------------------------
default      05.12.2020    05.12.20
en_DK.utf8   2020-12-05    05/12/2020
en_CA.utf8   2020-12-05    2020-12-05

So setting the LC_TIME variable has an effect, but there is a difference in the result. Since KMyMoney uses standard Qt functions to do the conversion I see this more of an upstream problem/feature.