Smile-SA/redmine_datetime_custom_field

Bad date format?

pmcculey opened this issue · 7 comments

I'm using this in redmine v4.1.0. I'm finding that the date produced is transposing month and day & time is not formatted per the redmine settings. If I set a custom field using the Date Time and then use that custom field when creating an issue, then if I select say May 2nd 2020 at 22:00 in the date time field, when I later view the issue, the date is showing as 05/02/2020. The redmine global date settings (administration/Settings/Display) are for the users language. For me (English (british) language setting) I'd expect a date of the format 02/05/2020. In truth though even if I select a format of yyyy-mm-dd and 24 hour time format in the settings, the displayed format when I view the issue is still 05/02/2020 with time as 10:00 PM. If I edit that issue, date & time are as I entered them in the custom field.

Redmine start dates and due dates are fine.

Seems like a locale issue, but I'm not seeing how to sort it out.

Hi, I just tested with V4.1 and I don't have the issue.

  • I tested with Date and Time format Based on user's language set in the Redmine Settings
    With French and English British set in the user profile.
  • I tested also with English date format in Redmine Settings
    Also, with French and English British set in the user profile.

Does the issue happens by selecting date through the calendar ?
If you type the date time, you have to use the international format anyway, unlike the standard date fields where editing the date is structured depending on the language that was chosen.

This constraint comes partly from the external JS library used : XDSoft for JS DateTime Picker

When I enter dated in the date time custom field, I want those date times to be the issue start/due times. Is that possible assuming I solve the format issue ?

It depends if you want a full integration (Gantt, Calendar, Issue precedes relations, etc.)

Perhaps you should try this plugin : https://github.com/nanego/redmine_datetime_custom_field
That goes more in the direction you want.

Hi @pmcculey, did you had any time to have the plugin working successfully ?

Hi V1.0.3 fixes issue with Date not in the user language format.