3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $timezone = new DateTimeZone('Europe/London'); $dateTime = new DateTime('now', $timezone); echo $dateTime->format('Y-m-d H:i:s') . "\n"; // +1 $timezone2 = new DateTimeZone('Europe/Amsterdam'); $dateTime->setTimeZone($timezone2); echo $dateTime->format('Y-m-d H:i:s') . "\n";
based on SYFG6
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.21.3, 7.0.0 - 7.3.0beta1
2017-10-06 15:29:10 2017-10-06 16:29:10
Output for hhvm-3.22.0
2017-10-06 15:29:11 2017-10-06 16:29:11