第一种
<script> function getTime(sj) { return new Date(parseInt(sj) * 1000).toLocaleString().replace(/:\d{1,2}$/,' '); } alert(getTime(1293072805)); </script>
第二种
<script> function getTime(sj) { return new Date(parseInt(sj) * 1000).toLocaleString().substr(0,17)} alert(getTime(1293072805)); </script>第三种
<script> function getTime(sj) { return new Date(parseInt(sj) * 1000).toLocaleString().replace(/年|月/g, "-").replace(/日/g, " "); } alert(getTime(1177824835)); </script>