SELECT issues.*, items.itype as itemtype, items.homebranch, items.barcode
FROM issues
LEFT JOIN items USING (itemnumber)
- WHERE date_due < CURDATE()
+ WHERE date_due < NOW()
";
} else {
$statement = "
FROM issues
LEFT JOIN items USING (itemnumber)
LEFT JOIN biblioitems USING (biblioitemnumber)
- WHERE date_due < CURDATE()
+ WHERE date_due < NOW()
";
}
LEFT JOIN biblio ON items.biblionumber = biblio.biblionumber
LEFT JOIN biblioitems ON items.biblioitemnumber = biblioitems.biblioitemnumber
WHERE issues.borrowernumber = ?
- AND issues.date_due < CURDATE()"
+ AND issues.date_due < NOW()"
);
# FIXME: SELECT * across 4 tables? do we really need the marc AND marcxml blobs??
$sth->execute($borrowernumber);
# these are the fields that will be substituted into <<item.content>>
my @item_content_fields = split( /,/, $itemscontent );
-binmode STDOUT, ':encoding(UTF-8)';
+binmode( STDOUT, ':encoding(UTF-8)' );
our $csv; # the Text::CSV_XS object
if ( $htmlfilename eq '' ) {
$html_fh = *STDOUT;
} else {
- my $today = C4::Dates->new();
- open $html_fh, ">",File::Spec->catdir ($htmlfilename,"notices-".$today->output('iso').".html");
+ my $today = DateTime->now(time_zone => C4::Context->tz );
+ open $html_fh, ">",File::Spec->catdir ($htmlfilename,"notices-".$today->ymd().".html");
}
print $html_fh "<html>\n";