From df35ff4d3ca2d8404732bc076a25abef35f40be2 Mon Sep 17 00:00:00 2001 From: genji Date: Sun, 28 Jan 2007 21:01:36 +0000 Subject: [PATCH] Fix for 1169, issuedate wasn't formatted properly, to compare with today's date. Fixed in rel_2_2 --- circ/circulation.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 55b66cd845..eca5f45cf7 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -86,7 +86,7 @@ $env{'queue'}=$printer; my @datearr = localtime(time()); # FIXME - Could just use POSIX::strftime("%Y%m%d", localtime); my $todaysdate = (1900+$datearr[5]).sprintf ("%0.2d", ($datearr[4]+1)).sprintf ("%0.2d", ($datearr[3])); - +warn $todaysdate; # check and see if we should print if ($barcode eq '' && $print eq 'maybe'){ @@ -199,7 +199,9 @@ if ($borrower) { # split in 2 arrays for today & previous foreach my $it (keys %$issueslist) { my $issuedate = $issueslist->{$it}->{'timestamp'}; - $issuedate = substr($issuedate, 0, 8); + $issuedate = substr($issuedate, 0, 10); + $issuedate=~s/-//g; + warn $issuedate; if ($todaysdate == $issuedate) { push @todaysissues, $issueslist->{$it}; } else {