[Koha-bugs] [Bug 13242] Slow checkin for patrons restricted indefinitely

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Nov 13 09:50:00 CET 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13242

Jonathan Druart <jonathan.druart at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #33510|0                           |1
        is obsolete|                            |

--- Comment #3 from Jonathan Druart <jonathan.druart at biblibre.com> ---
Created attachment 33511
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33511&action=edit
Bug 13242: DateUtils should manage separately 9999-* dates

On bug 13226, we have seen that
my $date = DateTime->new(year => 9999, month => 12, day => 31);
 => OK

DateTime::Format::DateParse->parse_datetime( '9999-12-31' );
 => OK

DateTime::Format::DateParse->parse_datetime( '9999-12-31',
 'America/Los_Angeles' );
 => KO (~20sec on my laptop)

For instance if you try to check in items for a patron which is
restricted indefinitely (and there is no overdue on the item), the code
in C4::Circulation::AddReturn l~1948
  my $borrower_debar_dt = dt_from_string( $borrower->{debarred} );
will be called.

dt_from_string should not called
DateTime::Format::DateParse->parse_datetime with the time zone parameter
in this case.

Test plan:
Create an indefinitely restriction for a patron and check an item in.
Without this patch, it should take ~20 sec.
With, ~2 or 3 sec.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list