need help php global date and time is not local date time

$info = getdate(); 
$year = $info['year']; 
echo date($year); 
$now = new DateTime(null, new DateTimeZone('Europe/Istanbul')); 
$now->setTimezone(new DateTimeZone('Europe/Istanbul')) 
echo $now->format("Y")

I need help. The server date must remain the same when I change the local date. Server changes date when local date changes.