理由はわかりませんが、4時間前に次の日時すべてが戻ってきます
function ago($timestamp){
$difference = floor((time() - strtotime($timestamp))/86400);
$periods = array("second", "minute", "hour", "day", "week", "month", "years", "decade");
$lengths = array("60","60","24","7","4.35","12","10");
for($j = 0; $difference >= $lengths[$j]; $j++)
$difference /= $lengths[$j];
$difference = round($difference);
if($difference != 1)
$periods[$j].= "s";
$text = "$difference $periods[$j] ago";
return $text;
}
私が送っている日付は
"replydate": "29/07/2012CDT04:54:27",
"replydate": "29/07/2012CDT00:20:10",