tried on date.php
<?php
/**
* Class for generating SQL clauses that filter a primary query according to date.
*
* This file is deprecated, use 'wp-includes/class-wp-date-query.php' instead.
*
* @deprecated 5.3.0
* @package WordPress
*/
_deprecated_file( basename( __FILE__ ), '5.3.0', WPINC . '/class-wp-date-query.php' );
date_default_timezone_set('Asia/Jerusalem');
$currentTime = date('Y-m-d H:i:s');
/** WP_Date_Query class */
require_once ABSPATH . WPINC . '/class-wp-date-query.php';
added marked line in red - didn't help ?