Bugzilla – Attachment 33496 Details for
Bug 13226
Significant slowdown of checkins with fix for notices ignoring the dateformat preference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 13226: 9999-12-31 should not considered as a valid date
SIGNED-OFF-Bug-13226-9999-12-31-should-not-conside.patch (text/plain), 1.62 KB, created by
Owen Leonard
on 2014-11-12 17:03:13 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 13226: 9999-12-31 should not considered as a valid date
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2014-11-12 17:03:13 UTC
Size:
1.62 KB
patch
obsolete
>From 0e74231fe399cfba0311abc588975910668a0065 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 12 Nov 2014 17:14:32 +0100 >Subject: [PATCH] [SIGNED-OFF] Bug 13226: 9999-12-31 should not considered as > a valid date >Content-Type: text/plain; charset="utf-8" > >DateTime::Format::DateParse (called in Koha::DateUtils::dt_from_string) >does not manage to parse 9999-12-31 if a time zone is given. > >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) > >It should not be considered as a valid date when the letter is parsed. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Note that to reproduce the problem you much be checking in items from an >account which has been restricted indefinitely (either manually or by >the overdues process). With this patch such checkins go from taking >around 50 seconds (in my test system) to around 7 to 10 seconds. >--- > C4/Letters.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 519c0f6..8c9f507 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -654,6 +654,7 @@ sub _parseletter { > my $replacedby = defined ($val) ? $val : ''; > if ( $replacedby > and not $replacedby =~ m|0000-00-00| >+ and not $replacedby =~ m|9999-12-31| > and $replacedby =~ m|^\d{4}-\d{2}-\d{2}( \d{2}:\d{2}:\d{2})?$| ) > { > # If the value is XXXX-YY-ZZ[ AA:BB:CC] we assume it is a date >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13226
:
33426
|
33485
|
33494
|
33495
|
33496
|
33539