diff --git a/includes/admin/class-secure.php b/includes/admin/class-secure.php index 1062d20f..262d4ee2 100644 --- a/includes/admin/class-secure.php +++ b/includes/admin/class-secure.php @@ -82,15 +82,17 @@ if ( ! class_exists( 'um\admin\Secure' ) ) { $query->set( 'date_query', array( - 'after' => human_time_diff( $date_from, strtotime( current_time( 'mysql' ) ) ) . ' ago', + 'after' => human_time_diff( $date_from, strtotime( current_time( 'mysql' ) ) ) . ' ago', + 'inclusive' => true, ) ); } elseif ( $date_from && $date_to ) { $query->set( 'date_query', array( - 'after' => human_time_diff( $date_from, strtotime( current_time( 'mysql' ) ) ) . ' ago', - 'before' => human_time_diff( $date_to, strtotime( current_time( 'mysql' ) ) ) . ' ago', + 'after' => human_time_diff( $date_from, strtotime( current_time( 'mysql' ) ) ) . ' ago', + 'before' => human_time_diff( $date_to, strtotime( current_time( 'mysql' ) ) ) . ' ago', + 'inclusive' => true, ) ); } diff --git a/includes/ajax/class-secure.php b/includes/ajax/class-secure.php index 8a884f22..8a5c7cc9 100644 --- a/includes/ajax/class-secure.php +++ b/includes/ajax/class-secure.php @@ -218,12 +218,12 @@ class Secure { 'number' => -1, 'exclude' => $arr_suspected_accounts, 'date_query' => array( - 'after' => gmdate( 'F d, Y', $oldest_date ), - 'before' => gmdate( 'F d, Y', $newest_date ), - 'inclusive' => true, + 'after' => gmdate( 'F d, Y', strtotime( '-1 day', $oldest_date ) ), + 'before' => gmdate( 'F d, Y', strtotime( '+1 day', $newest_date ) ), ), ) ); + } /**