[Koha-bugs] [Bug 13242] Slow checkin for patrons restricted indefinitely
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Nov 14 12:08:44 CET 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13242
--- Comment #15 from Jonathan Druart <jonathan.druart at biblibre.com> ---
Created attachment 33565
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33565&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.
Signed-off-by: Frederic Demians <f.demians at tamil.fr>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list