<script>function getLocalTime(nS) { return new Date(parseInt(nS) * 1000).toLocaleString().replace(/年|月/g, "-").replace(/日/g, " "); } alert(getLocalTime(1177824835)); </script>
用正則吧!!spa