format() does not calculate the absolute number of seconds of an Interval, it just gives you the values ββof internal attributes. Since you want to add, why not just use add() ? diff() returns a DateInterval object, and this is what add() needs.
$first_time=new DateTime('01/01/2000 00:00:00'); $second_time=new DateTime('01/01/2000 00:00:50'); $diff=$first_time->diff($second_time); $time=new DateTime('01/01/2012 12:00:00'); $time->add($diff); echo $time;
source share