3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump( DateTime::createFromFormat('Y-m-d\TH:i:s+', "2014-01-01T23:28:56.000Z")->setTimezone(new DateTimeZone('Pacific/Chatham')) );
based on sgMHK
Output for 5.5.14 - 7.2.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-02 12:13:56.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Pacific/Chatham" }
Output for 5.5.0 - 5.5.13
object(DateTime)#1 (3) { ["date"]=> string(19) "2014-01-02 12:13:56" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Pacific/Chatham" }