php date time plus seconds code example
Example 1: add seconds to datetime php
<?php
$date = new DateTime();
echo $date->getTimestamp(). "<br>";
$date->add(new DateInterval('PT674165S')); // adds 674165 secs
echo $date->getTimestamp();
?>
Example 2: php date to seconds
<?php
$str = 'Tue Dec 15 2009';
$timestamp = strtotime($str);
echo $timestamp;
//output: 1260831600
?>