From 5493a99486b4c3398f440d36c417d62e315fd5eb Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 14 Nov 2018 09:38:01 -0300 Subject: [PATCH] Bug 21829: Correctly format dateexpiry in notices (date only) dateexpiry is a date, we should not display the time part in notice. Test plan: Create a notice with borrowers.dateexpiry, generate this notice. The value should be displayed without the time part Signed-off-by: Kyle M Hall Signed-off-by: Nick Clemens (cherry picked from commit 5b160af2a051dc3693f04dabf320d0995cf26160) Signed-off-by: Martin Renvoize (cherry picked from commit ecb86a84c13e4e5661f4c6683b7755c21d607bbe) Signed-off-by: Lucas Gass --- C4/Letters.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index c2fff16da0..a4cc90c32e 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -785,7 +785,7 @@ sub _parseletter { my $values = $values_in ? { %$values_in } : {}; if ( $table eq 'borrowers' && $values->{'dateexpiry'} ){ - $values->{'dateexpiry'} = output_pref({ str => $values->{dateexpiry}, dateonly => 1 }); + $values->{'dateexpiry'} = output_pref({ dt => dt_from_string( $values->{'dateexpiry'} ), dateonly => 1 }); } if ( $table eq 'reserves' && $values->{'waitingdate'} ) { -- 2.39.5