Filter posts by date and time

Hi

On this site, https://cregy.uk/ all posts are filtered by day, so only posts dated for today’s date will show excluding the year. However, the filter doesn’t take account of time so if I posted at 15.45 on that day it won’t show the post until that time is reached. I need the filter to show all posts and exclude the time function. Here is the code I currently have:

add_action('pre_get_posts', 'cgy_same_day');
function cgy_same_day( $query ) {
if ( $query->is_home() && $query->is_main_query()) {
$query->set('date_query', array(
array(
'day' => date( 'j' ),
'month' => date( 'n' ),
),
));
}
return;
}

Thanks
Rich

Company
Gucu
Job Type
Project
Location
Lostwithiel
Budget
£20
How to Apply
Via email