View | Details | Raw Unified | Return to bug 13601
Collapse All | Expand All

(-)a/C4/Installer/PerlDependencies.pm (-5 lines)
Lines 222-232 our $PERL_DEPS = { Link Here
222
        'required' => '1',
222
        'required' => '1',
223
        'min_ver'  => '1.20'
223
        'min_ver'  => '1.20'
224
    },
224
    },
225
    'DateTime::Format::DateParse' => {
226
        'usage'    => 'Core',
227
        'required' => '1',
228
        'min_ver'  => '0.04'
229
    },
230
    'DateTime::Format::MySQL' => {
225
    'DateTime::Format::MySQL' => {
231
        'usage'    => 'Core',
226
        'usage'    => 'Core',
232
        'required' => '1',
227
        'required' => '1',
(-)a/C4/Members.pm (-5 / +2 lines)
Lines 36-42 use C4::SQLHelper qw(InsertInTable UpdateInTable SearchInTable); Link Here
36
use C4::Members::Attributes qw(SearchIdMatchingAttribute UpdateBorrowerAttribute);
36
use C4::Members::Attributes qw(SearchIdMatchingAttribute UpdateBorrowerAttribute);
37
use C4::NewsChannels; #get slip news
37
use C4::NewsChannels; #get slip news
38
use DateTime;
38
use DateTime;
39
use DateTime::Format::DateParse;
40
use Koha::Database;
39
use Koha::Database;
41
use Koha::DateUtils;
40
use Koha::DateUtils;
42
use Koha::Borrower::Debarments qw(IsDebarred);
41
use Koha::Borrower::Debarments qw(IsDebarred);
Lines 1195-1208 sub GetPendingIssues { Link Here
1195
    my $sth = C4::Context->dbh->prepare($query);
1194
    my $sth = C4::Context->dbh->prepare($query);
1196
    $sth->execute(@borrowernumbers);
1195
    $sth->execute(@borrowernumbers);
1197
    my $data = $sth->fetchall_arrayref({});
1196
    my $data = $sth->fetchall_arrayref({});
1198
    my $tz = C4::Context->tz();
1197
    my $today = dt_from_string;
1199
    my $today = DateTime->now( time_zone => $tz);
1200
    foreach (@{$data}) {
1198
    foreach (@{$data}) {
1201
        if ($_->{issuedate}) {
1199
        if ($_->{issuedate}) {
1202
            $_->{issuedate} = dt_from_string($_->{issuedate}, 'sql');
1200
            $_->{issuedate} = dt_from_string($_->{issuedate}, 'sql');
1203
        }
1201
        }
1204
        $_->{date_due} or next;
1202
        $_->{date_due} or next;
1205
        $_->{date_due} = DateTime::Format::DateParse->parse_datetime($_->{date_due}, $tz->name());
1203
        $_->{date_due} = dt_from_string($_->{date_due}, 'sql');
1206
        if ( DateTime->compare($_->{date_due}, $today) == -1 ) {
1204
        if ( DateTime->compare($_->{date_due}, $today) == -1 ) {
1207
            $_->{overdue} = 1;
1205
            $_->{overdue} = 1;
1208
        }
1206
        }
1209
- 

Return to bug 13601