[Koha] Harcoded date format in Members.pm -> GetMessages?

Martin Longo jmlongo at uncu.edu.ar
Tue Dec 7 10:08:59 NZDT 2010

Hello there!

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 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 module Messages.pm, in the 
GetMessage routine, as can be seen in the following chunk of code...

my $query = "SELECT
                  DATE_FORMAT( message_date, '%m/%d/%Y' ) AS 
                  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";

I've filed a bug (Bug 5476) about this

Ing. J. Martin Longo
Depto. Gestion Informatica
SID - UNCuyo

More information about the Koha mailing list