Bug 18957: Record the time part of the last renewed date
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 22 Feb 2019 14:06:46 +0000 (11:06 -0300)
committerroot <root@f1ebe1bec408>
Tue, 26 Feb 2019 13:09:02 +0000 (13:09 +0000)
issues.lastreneweddate is a datetime and we could record the time part
of the date.

Test plan:
Renew an issue
note that the time part of the last renewed date is set correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
C4/Circulation.pm

index fa08210..3c1d676 100644 (file)
@@ -2816,7 +2816,7 @@ sub AddRenewal {
     my $itemnumber      = shift or return;
     my $branch          = shift;
     my $datedue         = shift;
-    my $lastreneweddate = shift || DateTime->now(time_zone => C4::Context->tz)->ymd();
+    my $lastreneweddate = shift || DateTime->now(time_zone => C4::Context->tz);
 
     my $item   = GetItem($itemnumber) or return;
     my $item_object = Koha::Items->find( $itemnumber ); # Should replace $item