<?php
$date = date('2011-12-12 20:10:00');
$hour = date('H',strtotime($date));
$min = date('i',strtotime($date));
$sec = date('s',strtotime($date));
echo $hour,$min,$sec;
echo date('r', 1417364371).'<br/>';
$t=date('r', 1417364371);
echo $t.'<br/>';
echo date("YmdHis", strtotime($t)).'<br/>';
?>