#13352 closed defect (cantfix)
Date format of date set by datepicker calendar (JQuery) is in en_US format and not recognized as a date on a non en_US system
Reported by: | carfal | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | i18n | Version: | 1.5.2 |
Severity: | minor | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
while adding a date to a milestone the datepicker calendar shows up. If i set a date it's format is mm/dd/yy. the expected date format is different and so the milestone modify fails. Entering the date by hand in the expected format works fine. I was searching for
is an invalid date, or the date format is not known. Try
i found no ticket with the same problem. #2182 and #10245 did not help me.
I put
SetEnv LC_TIME "de_DE.UTF-8"
in the virtualhost of the trac site.conf in jquery-ui.js i changed
this.regional[ "" ] = { dateFormat: "mm/dd/yy" }
to
this.regional[ "" ] = { dateFormat: "dd.mm.yy" }
But it did not change anything, the date format stays the same.
i18n files for jquery are missing and i don't know where in trac to set the regional of datepicker.
$.datepicker.setDefaults($.datepicker.regional["de"]);
If i change the language in the preferences to englisch (US), the date is recognized.
@trac:~/trac-config# locale -a C C.UTF-8 de_DE de_DE@euro de_DE.iso88591 de_DE.iso885915@euro de_DE.utf8 deutsch en_US.utf8 german POSIX
OS is Debian 11 (updated)
python3 3.9.1+
apache 2.4.46
trac set up as wsgi
I'm not sure, if trac is the problem here, but there is no way to set the regional in the datepicker and trac does not parce the mm/dd/yy date format if set to de_DE.
Attachments (1)
Change History (8)
comment:1 by , 4 years ago
Description: | modified (diff) |
---|
by , 4 years ago
Attachment: | datepicker-format-on-de.png added |
---|
comment:2 by , 4 years ago
Resolution: | → cantfix |
---|---|
Status: | new → closed |
comment:3 by , 4 years ago
Resolution: | cantfix |
---|---|
Status: | closed → reopened |
I ran into the same bug today, and sorry: but this not a merely installation issue. It is a "makes it unusable"-type of bug - at least for people like me, who just done their first installation in their local language. Added some test tickets and wondered what's going on.
Please let me explain, why this is a major show-stopper for everyone who uses a different dateformat:
- Lets assume your have to gift a present to your grandma on her birthday, due "first of july".
- Lets assume you install trac, leaving the defaults, add milestone "grannys birthday party" and ticket "buy awsome gift (due 2021/06/01)".
- you'll see: some time left, go shopping, have happy grandma
- now assume you install trac, setting timezone to local (server and browser have german local time), add milestone and ticket
- now granny gets upset: german times are switched: 2021-06-01 will be 01.06.2021 and gifting your present in wintertime makes granny unhappy, apprently you totaly forgot her real birthday in summertime …
see. MAJOR BUG. really, please at least give a hint in the admin panel at the timezone setting to the right spot in the documentation (or at least here) - not everyone is able to understand all that documentation at first glance - its overwhelming (even perfect documentation is no help if it's too much to gasp). If I haven't used trac as a reporter before, I would have deleted it right away in the second I discovered that I'll deliver the cake on the wrong date.
So PLEASE fix this, it may look like a minor issue for you, but this is HUGE for people where your timeformat is "the switched one", so pretty pretty please.
Steps to reproduce: german server, german client, use datepicker, add project, change timesetting, change milestone, change timesettings again (everything only via websettings) at some point you'll even get messages that tell you that the entered (I cant enter, its the datepicker) dates are wrong.
By the way using the trac admin for milestone due modification works apparently perfect - at least it seams so, have to see, will report again if there are other issues
follow-up: 5 comment:4 by , 4 years ago
One persons major(!!) bug is the other persons works for me. I'm firmly in the latter camp. It's been smooth sailing for me from the beginning and no problems with date setting using Trac 1.4.2 and 1.5.2 and german or default language settings.
Your post is scarce with information about your settings but filled with fairy tales so it's difficult to be helpful here.
My system settings are this:
- macOS Mojave
- Region: Germany
- Preferred Language: English
- Date settings: (there're plenty her…)
- Short: 01.04.1976
- Medium: 1 Apr 1976
- Long: 1 April 1976
- Trac 1.4.2, Python 2.7.16
- Trac 1.5.2, Python 3.8.8
- Running
tracd
in a bash:
> $ locale LANG= LC_COLLATE="C" LC_CTYPE="UTF-8" LC_MESSAGES="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_ALL=
- Trac settings:
- Default Timezone: Server's local timezone
- Default Language: Browsers language
- Default date format: Browsers language
[trac] default_date_format =
- Browser: Firefox
When setting preferences to 'Default: Browser's language' all trac pages are served in english, date format on the milestone page is Apr 8, 2021, 6:00:00 PM
. Date picker uses the same format.
When setting preference to 'Deutsch' all pages are served in german and date format is 08.04.2021, 18:00:00
. Datepicker uses the same format.
Date format in the prefrences kept at 'Default language setting' in both cases.
Maybe this will help you with your problem.
comment:5 by , 4 years ago
Replying to Cinc-th:
- Browser: Firefox
When setting preferences to 'Default: Browser's language' all trac pages are served in english, date format on the milestone page is
Apr 8, 2021, 6:00:00 PM
. Date picker uses the same format.When setting preference to 'Deutsch' all pages are served in german and date format is
08.04.2021, 18:00:00
. Datepicker uses the same format.Date format in the prefrences kept at 'Default language setting' in both cases.
To make things clear:
These preferences are the user's preferences set using the link top left. Not settings on the admin page.
comment:6 by , 4 years ago
Resolution: | → cantfix |
---|---|
Status: | reopened → closed |
Issue misconstrued as Trac issue.
comment:7 by , 4 years ago
I put
SetEnv LC_TIME "de_DE.UTF-8"
in the virtualhost of the trac site.conf
SetEnv
directive sets to an internal variable in Apache, doesn't change environments in a process. Therefore, using LC_*
environment is incorrect.
trac.locale
should be used to environments in WSGI application to set your locale.
See source:/tags/trac-1.5.2/trac/web/main.py#/trac.locale
That'a an InstallationIssue (again).
InstallationIssue and works for me. It guesses that your wsgi script doesn't respect your locale settings.
Please ask on the mailing list for support questions.