use XML::Simple;
use HTML::Entities;
use CGI;
+use DateTime;
=head1 NAME
my ($cgi) = @_;
# Check if borrower exists, using a C4::Auth function...
- unless( checkpw( C4::Context->dbh, $cgi->param('username'), $cgi->param('password') ) ) {
+ unless( C4::Auth::checkpw( C4::Context->dbh, $cgi->param('username'), $cgi->param('password') ) ) {
return { code => 'PatronNotFound' };
}
# Hashref building
my $out;
$out->{'renewals'} = $issue->{'renewals'};
- $out->{'date_due'} = $issue->{'date_due'};
+ $out->{date_due} = $issue->{date_due}->strftime('%Y-%m-%d %H:%S');
$out->{'success'} = $renewal[0];
$out->{'error'} = $renewal[1];