Bug 20008: Fix restrictions added from memberentry.pl if TimeFormat is 12hr
authorKyle M Hall <kyle@bywatetsolutions.com>
Wed, 17 Jan 2018 19:30:06 +0000 (14:30 -0500)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 4 Apr 2018 18:45:44 +0000 (15:45 -0300)
Test Plan:
1) Set TimeFormat to 12 hour
2) Add a restriction with an expiration date via memberentry.pl
3) Note the restriction exists, but has no expiration date
4) Apply this patch
5) Repeat step 2
6) Note the restriction exists and has an expiration date!

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
members/memberentry.pl

index 94e371f..631759e 100755 (executable)
@@ -118,8 +118,7 @@ if ( $input->param('add_debarment') ) {
     my $expiration = $input->param('debarred_expiration');
     $expiration =
       $expiration
-      ? output_pref(
-        { 'dt' => dt_from_string($expiration), 'dateformat' => 'iso' } )
+      ? dt_from_string($expiration)->ymd
       : undef;
 
     AddDebarment(