3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date1 = '2017-06-15T13:16:47.079053900Z'; $date2 = '2017-06-15T13:17:23.536978600Z'; $x = new DateTime(explode('.', $date1)[0]); echo $x->format('Y-m-d H:i:s');
based on bRnis
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0alpha1
2017-06-15 13:16:47