Bugzilla – Attachment 37089 Details for
Bug 13601
Get rid of DateTime::Format::DateParse
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 13601: get rid of DateTime::Format::DateParse
PASSED-QA-Bug-13601-get-rid-of-DateTimeFormatDateP.patch (text/plain), 2.62 KB, created by
Katrin Fischer
on 2015-03-22 19:57:06 UTC
(
hide
)
Description:
[PASSED QA] Bug 13601: get rid of DateTime::Format::DateParse
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-03-22 19:57:06 UTC
Size:
2.62 KB
patch
obsolete
>From 9d3a373435259064a2859ad4db83886d1cda697c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 20 Jan 2015 15:32:45 +0100 >Subject: [PATCH] [PASSED QA] Bug 13601: get rid of DateTime::Format::DateParse >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This module is used in C4::Members::GetPendingIssues too, but we can use >dt_from_string. > >Test plan: >1/ Verify that > prove t/db_dependent/Members/GetPendingIssues.t >returns green >2/ On the patron pending issue list, verify that the issue and the due >dates are correctly displayed. > >Tested together with other patches (except "Fix special cases). Worked as expected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Installer/PerlDependencies.pm | 5 ----- > C4/Members.pm | 6 ++---- > 2 files changed, 2 insertions(+), 9 deletions(-) > >diff --git a/C4/Installer/PerlDependencies.pm b/C4/Installer/PerlDependencies.pm >index 34cd8b5..67ec808 100644 >--- a/C4/Installer/PerlDependencies.pm >+++ b/C4/Installer/PerlDependencies.pm >@@ -222,11 +222,6 @@ our $PERL_DEPS = { > 'required' => '1', > 'min_ver' => '1.20' > }, >- 'DateTime::Format::DateParse' => { >- 'usage' => 'Core', >- 'required' => '1', >- 'min_ver' => '0.04' >- }, > 'DateTime::Format::MySQL' => { > 'usage' => 'Core', > 'required' => '1', >diff --git a/C4/Members.pm b/C4/Members.pm >index 4fb845d..a98d16f 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -36,7 +36,6 @@ use C4::SQLHelper qw(InsertInTable UpdateInTable SearchInTable); > use C4::Members::Attributes qw(SearchIdMatchingAttribute UpdateBorrowerAttribute); > use C4::NewsChannels; #get slip news > use DateTime; >-use DateTime::Format::DateParse; > use Koha::Database; > use Koha::DateUtils; > use Koha::Borrower::Debarments qw(IsDebarred); >@@ -1195,14 +1194,13 @@ sub GetPendingIssues { > my $sth = C4::Context->dbh->prepare($query); > $sth->execute(@borrowernumbers); > my $data = $sth->fetchall_arrayref({}); >- my $tz = C4::Context->tz(); >- my $today = DateTime->now( time_zone => $tz); >+ my $today = dt_from_string; > foreach (@{$data}) { > if ($_->{issuedate}) { > $_->{issuedate} = dt_from_string($_->{issuedate}, 'sql'); > } > $_->{date_due} or next; >- $_->{date_due} = DateTime::Format::DateParse->parse_datetime($_->{date_due}, $tz->name()); >+ $_->{date_due} = dt_from_string($_->{date_due}, 'sql'); > if ( DateTime->compare($_->{date_due}, $today) == -1 ) { > $_->{overdue} = 1; > } >-- >1.9.1
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 13601
:
35405
|
35406
|
35407
|
35408
|
35433
|
36733
|
36734
|
36735
|
36736
|
36737
|
36745
|
36746
|
36747
|
36748
|
36754
|
36755
|
36756
|
36928
|
36933
|
36939
|
37023
|
37087
|
37088
| 37089 |
37090
|
37091
|
37092
|
37093