| Summary: | Harcoded date format en Members.pm -> GetMessages | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Martin Longo <jmlongo> |
| Component: | Patrons | Assignee: | Kyle M Hall (khall) <kyle> |
| Status: | CLOSED DUPLICATE | QA Contact: | Bugs List <koha-bugs> |
| Severity: | minor | ||
| Priority: | P5 - low | CC: | gmcharlt |
| Version: | rel_3_2 | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
I have came across a problem with the messages system, as it displays the messages for the borrowers with a date format that is not the format chosen for the system in SysPrefs... We use the dd/mm/yyyy date format system wide, and the messages have their dates in the mm/dd/yyyy format. I backtraced the date that is printed with the message and found that this problematic format is harcoded in the GetMessage routine, inside the module Messages.pm, as can be seen in the following chunk of code... my $query = "SELECT branches.branchname, messages.*, DATE_FORMAT( message_date, '%m/%d/%Y' ) AS message_date_formatted, messages.branchcode LIKE '$branchcode' AS can_delete FROM messages, branches WHERE borrowernumber = ? AND message_type LIKE ? AND messages.branchcode = branches.branchcode ORDER BY message_date DESC";