1function seconds2human($ss) {
2$s = $ss%60;
3$m = floor(($ss%3600)/60);
4$h = floor(($ss%86400)/3600);
5$d = floor(($ss%2592000)/86400);
6$M = floor($ss/2592000);
7
8return "$M months, $d days, $h hours, $m minutes, $s seconds";
9}
1<?php
2$date = new DateTime();
3echo $date->getTimestamp(). "<br>";
4$date->add(new DateInterval('PT674165S')); // adds 674165 secs
5echo $date->getTimestamp();
6?>