I have the inconsistency in post published time. For example, as I published a post on April 20nd 9pm and it is April 20nd 9:30, wordpress shows it is published one minute ago in the admin end. Also in case, a post is published like 18 hours ago, wordpress says it is published only an hour ago. (it display correct time as it passed a day)
Accordingly(perhaps) my code below does not work correctly.
function filter_where( $where = '' ) {
$where .= " AND post_date > '" . date('Y-m-d',strtotime('-1440 minutes')) . "'";
return $where;
}
add_filter( 'posts_where', 'filter_where' );
This code supposed to query posts within a day time frame, but it actually displaying posts within 37 hours time frame.
I have set a server time and wordpress time zone correctly and consistently but have no good result back.