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$str = 'Tue Dec 15 2009';
3$timestamp = strtotime($str);
4echo $timestamp;
5//output: 1260831600
6?>