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

(-)a/opac/opac-alert-subscribe.pl (-1 lines)
Lines 23-29 use warnings; Link Here
23
23
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Auth;
25
use C4::Auth;
26
use C4::Dates;
27
use C4::Output;
26
use C4::Output;
28
use C4::Context;
27
use C4::Context;
29
use C4::Koha;
28
use C4::Koha;
(-)a/opac/opac-ics.pl (-1 lines)
Lines 35-41 use C4::Auth; Link Here
35
use C4::Koha;
35
use C4::Koha;
36
use C4::Circulation;
36
use C4::Circulation;
37
use C4::Members;
37
use C4::Members;
38
use C4::Dates;
39
38
40
my $query = new CGI;
39
my $query = new CGI;
41
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
40
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
(-)a/opac/opac-memberentry.pl (-3 / +7 lines)
Lines 29-34 use Koha::Borrower::Modifications; Link Here
29
use C4::Branch qw(GetBranchesLoop);
29
use C4::Branch qw(GetBranchesLoop);
30
use C4::Scrubber;
30
use C4::Scrubber;
31
use Email::Valid;
31
use Email::Valid;
32
use Koha::DateUtils;
32
33
33
my $cgi = new CGI;
34
my $cgi = new CGI;
34
my $dbh = C4::Context->dbh;
35
my $dbh = C4::Context->dbh;
Lines 331-339 sub ParseCgiForBorrower { Link Here
331
        }
332
        }
332
    }
333
    }
333
334
334
    $borrower{'dateofbirth'} =
335
    my $dob_dt;
335
      C4::Dates->new( $borrower{'dateofbirth'} )->output("iso")
336
    $dob_dt = eval { dt_from_string( $borrower{'dateofbirth'} ); }
336
      if ( defined( $borrower{'dateofbirth'} ) );
337
        if ( defined( $borrower{'dateofbirth'} ) );
338
339
    $borrower{'dateofbirth'} = output_pref ( { dt => $dob_dt, dateonly => 1, dateformat => 'iso' })
340
        if ( $dob_dt );
337
341
338
    return %borrower;
342
    return %borrower;
339
}
343
}
(-)a/opac/opac-reserve.pl (-3 / +2 lines)
Lines 28-34 use C4::Reserves; Link Here
28
use C4::Biblio;
28
use C4::Biblio;
29
use C4::Items;
29
use C4::Items;
30
use C4::Output;
30
use C4::Output;
31
use C4::Dates qw/format_date/;
32
use C4::Context;
31
use C4::Context;
33
use C4::Members;
32
use C4::Members;
34
use C4::Branch; # GetBranches
33
use C4::Branch; # GetBranches
Lines 467-473 foreach my $biblioNum (@biblionumbers) { Link Here
467
466
468
        if ( defined $reservedate ) {
467
        if ( defined $reservedate ) {
469
            $itemLoopIter->{backgroundcolor} = 'reserved';
468
            $itemLoopIter->{backgroundcolor} = 'reserved';
470
            $itemLoopIter->{reservedate}     = format_date($reservedate);
469
            $itemLoopIter->{reservedate}     = output_pref({ dt => dt_from_string($reservedate), dateonly => 1 });
471
            $itemLoopIter->{ReservedForBorrowernumber} = $reservedfor;
470
            $itemLoopIter->{ReservedForBorrowernumber} = $reservedfor;
472
            $itemLoopIter->{ReservedForSurname}        = $ItemBorrowerReserveInfo->{'surname'};
471
            $itemLoopIter->{ReservedForSurname}        = $ItemBorrowerReserveInfo->{'surname'};
473
            $itemLoopIter->{ReservedForFirstname}      = $ItemBorrowerReserveInfo->{'firstname'};
472
            $itemLoopIter->{ReservedForFirstname}      = $ItemBorrowerReserveInfo->{'firstname'};
Lines 501-507 foreach my $biblioNum (@biblionumbers) { Link Here
501
        my ( $transfertwhen, $transfertfrom, $transfertto ) =
500
        my ( $transfertwhen, $transfertfrom, $transfertto ) =
502
          GetTransfers($itemNum);
501
          GetTransfers($itemNum);
503
        if ( $transfertwhen && ($transfertwhen ne '') ) {
502
        if ( $transfertwhen && ($transfertwhen ne '') ) {
504
            $itemLoopIter->{transfertwhen} = format_date($transfertwhen);
503
            $itemLoopIter->{transfertwhen} = output_pref({ dt => dt_from_string($transfertwhen), dateonly => 1 });
505
            $itemLoopIter->{transfertfrom} =
504
            $itemLoopIter->{transfertfrom} =
506
              $branches->{$transfertfrom}{branchname};
505
              $branches->{$transfertfrom}{branchname};
507
            $itemLoopIter->{transfertto} = $branches->{$transfertto}{branchname};
506
            $itemLoopIter->{transfertto} = $branches->{$transfertto}{branchname};
(-)a/opac/opac-search-history.pl (-1 / +1 lines)
Lines 26-33 use C4::Output; Link Here
26
use C4::Log;
26
use C4::Log;
27
use C4::Items;
27
use C4::Items;
28
use C4::Debug;
28
use C4::Debug;
29
use C4::Dates;
30
use C4::Search::History;
29
use C4::Search::History;
30
31
use URI::Escape;
31
use URI::Escape;
32
use POSIX qw(strftime);
32
use POSIX qw(strftime);
33
33
(-)a/opac/opac-serial-issues.pl (-1 lines)
Lines 24-30 use warnings; Link Here
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Auth;
25
use C4::Auth;
26
use C4::Koha;
26
use C4::Koha;
27
use C4::Dates;
28
use C4::Serials;
27
use C4::Serials;
29
use C4::Letters;
28
use C4::Letters;
30
use C4::Output;
29
use C4::Output;
(-)a/opac/opac-showreviews.pl (-5 / +6 lines)
Lines 28-35 use C4::Output; Link Here
28
use C4::Circulation;
28
use C4::Circulation;
29
use C4::Review;
29
use C4::Review;
30
use C4::Biblio;
30
use C4::Biblio;
31
use C4::Dates;
32
use C4::Members qw/GetMemberDetails/;
31
use C4::Members qw/GetMemberDetails/;
32
use Koha::DateUtils;
33
use POSIX qw(ceil strftime);
33
use POSIX qw(ceil strftime);
34
34
35
my $template_name;
35
my $template_name;
Lines 57-64 my ( $template, $borrowernumber, $cookie ) = &get_template_and_user( Link Here
57
);
57
);
58
58
59
if($format eq "rss"){
59
if($format eq "rss"){
60
    my $lastbuilddate = C4::Dates->new();
60
    my $lastbuilddate = dt_from_string;
61
    my $lastbuilddate_output = $lastbuilddate->output("rfc822");
61
    my $lastbuilddate_output = $lastbuilddate->strftime("%a, %d %b %Y %H:%M:%S %z");
62
    $template->param(
62
    $template->param(
63
        rss => 1,
63
        rss => 1,
64
        timestamp => $lastbuilddate_output
64
        timestamp => $lastbuilddate_output
Lines 114-121 for my $result (@$reviews){ Link Here
114
	}
114
	}
115
115
116
    if($format eq "rss"){
116
    if($format eq "rss"){
117
        my $rsstimestamp = C4::Dates->new($result->{datereviewed},"iso");
117
        my $rsstimestamp = eval { dt_from_string( $result->{datereviewed} ); };
118
        my $rsstimestamp_output = $rsstimestamp->output("rfc822");
118
        $rsstimestamp = dt_from_string unless ( $rsstimestamp ); #default to today if something went wrong
119
        my $rsstimestamp_output = $rsstimestamp->strftime("%a, %d %b %Y %H:%M:%S %z");
119
        $result->{timestamp} = $rsstimestamp_output;
120
        $result->{timestamp} = $rsstimestamp_output;
120
    }
121
    }
121
}
122
}
(-)a/opac/opac-suggestions.pl (-2 lines)
Lines 27-33 use C4::Koha; Link Here
27
use C4::Output;
27
use C4::Output;
28
use C4::Suggestions;
28
use C4::Suggestions;
29
use C4::Koha;
29
use C4::Koha;
30
use C4::Dates;
31
use C4::Scrubber;
30
use C4::Scrubber;
32
31
33
use Koha::DateUtils qw( dt_from_string );
32
use Koha::DateUtils qw( dt_from_string );
34
- 

Return to bug 14956