Como adicionar um minuto de hora nos segundos no PHP DateTime
date('Y-m-d H:i',strtotime('+1 hour +20 minutes',strtotime($start)));
Shiny Skipper
date('Y-m-d H:i',strtotime('+1 hour +20 minutes',strtotime($start)));
function seconds2human($ss) {
$s = $ss%60;
$m = floor(($ss%3600)/60);
$h = floor(($ss%86400)/3600);
$d = floor(($ss%2592000)/86400);
$M = floor($ss/2592000);
return "$M months, $d days, $h hours, $m minutes, $s seconds";
}
<?php
$date = new DateTime();
echo $date->getTimestamp(). "<br>";
$date->add(new DateInterval('PT674165S')); // adds 674165 secs
echo $date->getTimestamp();
?>