Bug 9811 - datetime does not respect DateFormat-system prefrence

To test:
Try searching by the date of birth using the left filter column. Good luck.

After applying this patch:
You can search using your preferred DateFormat.

Merci bocu

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Olli-Antti Kivilahti 2014-03-14 12:39:03 +01:00 committed by Tomas Cohen Arazi
parent 47dbd2e691
commit a660d2208b
1 changed files with 5 additions and 0 deletions

View File

@ -24,6 +24,7 @@ use C4::Auth qw( get_template_and_user );
use C4::Output qw( output_with_http_headers );
use C4::Utils::DataTables qw( dt_get_params );
use C4::Utils::DataTables::Members qw( search );
use Koha::DateUtils qw( output_pref dt_from_string );
my $input = new CGI;
@ -44,6 +45,10 @@ my $branchcode = $input->param('branchcode');
my $searchtype = $input->param('searchtype');
my $searchfieldstype = $input->param('searchfieldstype');
if ( $searchfieldstype eq "dateofbirth" ) {
$searchmember = output_pref({dt => dt_from_string($searchmember), dateformat => 'iso', dateonly => 1});
}
# variable information for DataTables (id)
my $sEcho = $input->param('sEcho');