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

(-)a/C4/NewsChannels.pm (-4 / +3 lines)
Lines 197-209 sub GetNewsToDisplay { Link Here
197
        OR    expirationdate IS NULL
197
        OR    expirationdate IS NULL
198
        OR    expirationdate = '00-00-0000'
198
        OR    expirationdate = '00-00-0000'
199
     )
199
     )
200
     AND   `timestamp` < CURRENT_DATE()+1
200
     AND   CAST( `timestamp` AS DATE ) <= CURRENT_DATE()
201
     AND   (lang = '' OR lang = ?)
201
     AND   (lang = '' OR lang = ?)
202
     AND   (branchcode IS NULL OR branchcode = ?)
202
     AND   (branchcode IS NULL OR branchcode = ?)
203
     ORDER BY number
203
     ORDER BY number
204
    }; # expirationdate field is NOT in ISO format?
204
    }; # expirationdate field is NOT in ISO format?
205
       # timestamp has HH:mm:ss, CURRENT_DATE generates 00:00:00
205
       # casting timestamp to date truncates HH:mm:ss
206
       #           by adding 1, that captures today correctly.
206
       # changing to <= CURRENT_DATE() today is captured.
207
    my $sth = $dbh->prepare($query);
207
    my $sth = $dbh->prepare($query);
208
    $lang = $lang // q{};
208
    $lang = $lang // q{};
209
    $sth->execute($lang,$branch);
209
    $sth->execute($lang,$branch);
210
- 

Return to bug 12167