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

(-)a/C4/NewsChannels.pm (-1 / +2 lines)
Lines 190-195 sub get_opac_news { Link Here
190
190
191
sub GetNewsToDisplay {
191
sub GetNewsToDisplay {
192
    my ($lang,$branch) = @_;
192
    my ($lang,$branch) = @_;
193
193
    my $dbh = C4::Context->dbh;
194
    my $dbh = C4::Context->dbh;
194
    # SELECT *,DATE_FORMAT(timestamp, '%d/%m/%Y') AS newdate
195
    # SELECT *,DATE_FORMAT(timestamp, '%d/%m/%Y') AS newdate
195
    my $query = q{
196
    my $query = q{
Lines 216-222 sub GetNewsToDisplay { Link Here
216
    $sth->execute($lang,$branch);
217
    $sth->execute($lang,$branch);
217
    my @results;
218
    my @results;
218
    while ( my $row = $sth->fetchrow_hashref ){
219
    while ( my $row = $sth->fetchrow_hashref ){
219
        $row->{newdate} = output_pref({ dt => dt_from_string( $row->{newdate} ), dateonly => 1 });
220
        $row->{newdate} = output_pref({ dt => dt_from_string( $row->{newdate}, 'iso' ), dateonly => 1 });
220
        push @results, $row;
221
        push @results, $row;
221
    }
222
    }
222
    return \@results;
223
    return \@results;
(-)a/Koha/DateUtils.pm (-2 / +1 lines)
Lines 109-115 sub dt_from_string { Link Here
109
        $regex = $fallback_re;
109
        $regex = $fallback_re;
110
    }
110
    }
111
    else {
111
    else {
112
        die "Invalid dateformat parameter ($date_format)";
112
        carp "Invalid dateformat parameter ($date_format)";
113
    }
113
    }
114
114
115
    # Add the faculative time part [hh:mm[:ss]]
115
    # Add the faculative time part [hh:mm[:ss]]
116
- 

Return to bug 16430