3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = new DateTimeImmutable('2016-10-29T00:00:00UTC+00:00'); $londonTimeZone = new DateTimeZone('Europe/London'); $londonTime = $time->setTimezone($londonTimeZone); $notLondonTime = new DateTimeImmutable('2016-10-29T00:00:00+00:00', new DateTimeZone('Europe/London')); var_dump($londonTime, $notLondonTime);
based on HunQM