3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = new DateTime('2017-10-31T23:00:00Z', new \DateTimeZone("Europe/Berlin")); echo $a->format('Y-m-d H:i:s') . PHP_EOL; $b = new DateTime($a->format('Y-m-d H:i:s'), new \DateTimeZone("Europe/Berlin")); echo $a->format(DATE_ISO8601);
based on nBaUe
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0rc3
2017-10-31 23:00:00 2017-10-31T23:00:00+0000