3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dtz = new DateTimeZone('Europe/Moscow'); $date = new DateTime("2018-11-14 00:00:00", $dtz); $time_from = new DateTime("1970-01-01 15:00:00", $dtz); $time_to = new DateTime("1970-01-01 16:00:00", $dtz); $date_from = new DateTime( $date->format('Y-m-d') . ' ' . $time_from->format('H:i:sP') , $dtz ); echo $date_from->format('Y-m-d H:i:sP') . "\n"; echo $date_from->getTimestamp();
based on 3n7Vm
Output for 5.6.38 - 7.3.0rc3
2018-11-14 15:00:00+03:00 1542196800