[kexi] [Bug 378481] Entering **/**/17 in a date field saves as the year 1917
Jarosław Staniek
bugzilla_noreply at kde.org
Thu Nov 30 16:28:47 UTC 2017
https://bugs.kde.org/show_bug.cgi?id=378481
--- Comment #3 from Jarosław Staniek <staniek at kde.org> ---
Initial remarks:
- the real problem is lack of precision regarding years number if the current
short date format is set to two digits (which is the case if the locale is "C"
or en_US); thus the *input* format does not allow precise input
- assuming the user input is correct the date is always stored correctly (in
locale-independent precise ISO 8601 format)
(Development note) Future Kexi can work around this problem in many ways:
- by automatically default to 4 digit year in any formats (seems to me similar
to newer Access
https://support.office.com/en-us/article/Format-the-date-and-time-field-in-Access-47fbbdc1-52fa-416a-b8d5-ba24d881b698#__toc260216068)
- by allowing to change the format in the application to override the system
settings
- by allowing to change the same in given Kexi project
- by allowing to change the same in given object (table, form, report,
query...)
- support legacy approach known e.g. from MS Access (explained in the warning
https://support.office.com/en-us/article/Format-Property-Date-Time-Data-Type-3251a423-3dd7-446e-be65-c7293eddbb43)
- it's generally safe, unless dates before 1930 are used, for example Ian is
using them so he would need 4 digits years instead -
https://forum.kde.org/viewtopic.php?f=221&t=139802)
Current solution explained below is *proper* too and works for Kexi 3.1 Alpha,
3.0 and older. It's not a workaround as the problem exists for any application
that uses the system's (or user's) global settings for the date format.
SOLUTION without fixing Kexi: change your locale for date/time to use four
years digits. For example dd-mm-yyyy format could be achieved by using
English-Denmark date/time.
How? Two ways:
Approach 1. On Linux use the LC_TIME environment variable prior to running Kexi
LC_TIME=en_DK kexi
(or "LC_TIME=en_DK kexi-3.1" for Kexi 3.1)
("LC_TIME=en_DK /path/to/kexi-******x86_64.AppImage" works too for app images)
This approach affects only Kexi. You can create a script, alias or desktop
shortcut to make this choice persistent.
Approach 2. Change the date/time locale in your desktop environment of choice
(find instructions how to do that, often it can be done graphically). This is
persistent change for all applications behaving like Kexi and can affect both
default settings for input and display (e.g. in printouts).
If you prefer dd/mm/yyyy use locale LC_TIME=en_GB instead.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Kexi-bugs
mailing list