<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
</body>
</html>
<script type="text/javascript">
function for_php_date_to_str(timestamp)
{
update=new Date(timestamp*1000);//时间戳要乘1000
year=update.getFullYear();
month=(update.getMonth()+1<10)?('0'+(update.getMonth()+1)):(update.getMonth()+1);
day=(update.getDate()<10)?('0'+update.getDate()):(update.getDate());
hour=(update.getHours()<10)?('0'+update.getHours()):(update.getHours());
minute=(update.getMinutes()<10)?('0'+update.getMinutes()):(update.getMinutes());
second=(update.getSeconds()<10)?('0'+update.getSeconds()):(update.getSeconds());
return (year+'-'+month+'-'+day+' '+hour+':'+minute+':'+second);
}
alert(for_php_date_to_str("1381313200"))
</script>