keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
21.02k stars 1.45k forks source link

Ability to change date format and conform to ISO 8601 by default #2155

Open mvpwizard opened 6 years ago

mvpwizard commented 6 years ago

Currently there is no way to change the date format from MM/dd/yyyy HH:mm. It would be better if the user could select from a list of predefined date formats as well as define their own.

Expected Behavior

The user can change the date format in KeePassXC's settings

Current Behavior

The user is restricted to the format MM/dd/yyyy HH:mm

Context

I do not like the US date format because the month and day are out of order. This makes it hard to figure out when exactly a date is for me. I always prefer when the month's three letter code is used instead or when is is unambiguous which number represents the month. For example in yyyy-MM-dd the month number is unambiguously the middle number.

TheZ3ro commented 6 years ago

I cannot reproduce, see images below. My guess is that Qt is guessing the date format from the language/operative system and probably you are using something like Snap or AppImage that fallback automatically to US format

istantanea_2018-07-26_10-38-52 istantanea_2018-07-26_10-38-36

mvpwizard commented 6 years ago

Yes, I am using Snap. My operating system is using United Kingdom formats so I think that Snap is responsible for the US date format. I still think it would be a nice feature if I could set a custom date format though.

droidmonkey commented 6 years ago

I agree with the feature to set the date format within the app

oittaa commented 6 years ago

If the locale can't be detected, the default should be ISO 8601, not some random MM/dd/yyyy HH:mm.

C0rn3j commented 4 years ago

I'd also like ISO 8601 to be the default, no matter the locale.

While in some cases one could guess the format from the available data - image

In others this is impossible. image

There's no yyyy-dd-mm so ISO 8601 is something everyone understands, no matter whether they're from EU, USA or elsewhere.

maricn commented 3 years ago

+1 to the request.. can we make it read and respect LC_TIME envvar?

aib commented 1 month ago

In my case, it was Qt not playing nice with my locale settings (en_US + en_DK).

Using LC_TIME=en_SE worked.

$ LC_TIME=en_DK.UTF-8 date +%c
2024-09-11T10:55:42 +03
$ LC_ALL=en_DK.UTF-8 LC_TIME=en_DK.UTF-8 ./release/KeePassXC.AppDir/usr/local/bin/keepassxc

Straight source build from current develop (c8fc25ea). Dates are still dd/mm/yyyy (or mm/dd/yyyy—I can't tell).

Whatever method is being used to detect locale is not working.

--

Seems to be due to Qt (CLDR?) not having en_DK. Setting LC_TIME to, say, en_CA changes the formats accordingly.

Now to find an english-speaking country which uses YYYY-mm-dd HH:MM:SS...