We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum
Matching dates for news collection
I have a collection on a site used for news. In my code I have this;
perch_collection('News', [ 'template' =>'news/_teaser.html', 'filter' => 'date', 'match' => 'lte', 'value' => date('Y-m-d'), 'sort' =>'date', 'sort-order' =>'DESC', 'count' => 4, 'paginate' => true, 'page-links' => true, 'page-link-style' => all ]); }
So basically matches any articles with todays date or older and shows them, I did this so the user can add articles in the future if required(like the normal blog system). However, they have added a post today and it is not showing up? if I change the date to yesterday it is fine.
Upon outputting the two dates, the difference I see is this:
With the former being the perch one.
Any ideas how to fix/avoid this?
Want to reply to this thread?Login with Perch