Skip to content

Commit

Permalink
[TekstTV] Fix post end date (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmens authored Oct 27, 2024
1 parent d77fe85 commit a5e752e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/teksttv.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private function get_article_slides($block)
// Skip if the post's expiration date has passed
$end_date = get_field('post_kabelkrant_datum_uit', get_the_ID());
if (!empty($end_date)) {
$end_date_obj = DateTime::createFromFormat('d/m/Y', $end_date);
$end_date_obj = DateTime::createFromFormat('Y-m-d H:i:s', $end_date);
if ($end_date_obj && $end_date_obj->getTimestamp() < current_time('timestamp')) {
continue;
}
Expand Down

0 comments on commit a5e752e

Please sign in to comment.