[Koha] Renewal date-time in "issues.lastreneweddate"

Ramprasad S. Joshi rsj at goa.bits-pilani.ac.in
Fri Sep 5 23:37:06 NZST 2014


Hello,

We (at BITS, Pilani - Goa Campus, Goa INDIA) have a problem of reporting
renewal date-times on koha 3.14.08.000. I suppose it is there with newer
versions as well.

1. *The Problem:* For all renewals, the date-time recorded in "issues.
*lastreneweddate*" is the "today" date and *midnight 00:00:00 time* *regardless
of the actual time of transaction*. This makes hourly or forenoon-afternoon
circulation reports confusing to our library staff when they try to tally
the numbers. For fresh issues and clear returns, the issuedate and
returndate respectively are the timestamp itself. For renewals, the
timestamp is exact but the lastrenewddate is the midnight time of today.
2. *The Source:* I have located the exact source of the problem thus:
   * In Circulation.pm (in lib/C4):
         The function AddRenewal takes $lastreneweddate as a last optional
parameter. When NULL, the default is (line 2534):
          DateTime->now(timezone => C4:Context->tz())->ymd().
         Thus only the ymd part of now is taken, and the hh:mm:ss become
all zero by default.
   * In renew.pl (in intranet/cgi-bin/circ):
       at line 79: my $date_due = AddRenewal( undef, $item->itemnumber() );
passes only two parameters, hence lastreneweddate is null and defaults to
midnight as above.
   * A similar story goes with line 90 in renewscript.pl in
intranet/cgi-bin/reserve.
3. *A Solution:* I suppose removing the "->ymd()" part in line 2534 in
Circulation.pm in lib/C4 will not cause any problem to any other part in
koha, in fact it will make it more consistent and more accurate.

I hope this simple rectification is incorporated after due examination.

Thanks,

Ramprasad Joshi
CS-IS Dept
BITS, Pilani - K K Birla Goa Campus
Zuarinagar, GOA INDIA 403726
Phone +91 832 2580 121
Fax +91 832 2557033


More information about the Koha mailing list