Bug 5549 : GetPendingIssues now returns DateTime objects
[koha.git] / members / readingrec.pl
index d4ecf65..05ade6a 100755 (executable)
@@ -30,6 +30,7 @@ use C4::Output;
 use C4::Members;
 use C4::Branch;
 use List::MoreUtils qw/any uniq/;
+use Koha::DateUtils;
 
 use C4::Dates qw/format_date/;
 use C4::Members::Attributes qw(GetBorrowerAttributes);
@@ -75,7 +76,8 @@ foreach my $issue (@{$issues}){
        $line{title}           = $issue->{'title'};
        $line{author}          = $issue->{'author'};
        $line{classification}  = $issue->{'classification'} || $issue->{'itemcallnumber'};
-       $line{date_due}        = format_date($issue->{'date_due'});
+    my $dt = dt_from_string($issue->{date_due}, 'sql');
+       $line{date_due}        = output_pref($dt);
        $line{returndate}      = format_date($issue->{'returndate'});
        $line{issuedate}       = format_date($issue->{'issuedate'});
        $line{issuingbranch}   = GetBranchName($issue->{'branchcode'});