//第ä¸ç§
function getLocalTime(nS) {
return new Date(parseInt(nS) * 1000).toLocaleString().replace(/:\d{1,2}$/,' ');
}
alert(getLocalTime(1293072805));
//ç»ææ¯2010å¹´12æ23æ¥ 10:53//第äºç§
function getLocalTime(nS) {
return new Date(parseInt(nS) * 1000).toLocaleString().substr(0,17)
}
alert(getLocalTime(1293072805));//第ä¸ç§ æ ¼å¼ä¸ºï¼2010-10-20 10:00:00
function getLocalTime(nS) {
return new Date(parseInt(nS) * 1000).toLocaleString().replace(/å¹´|æ/g, "-").replace(/æ¥/g, " ");
}
alert(getLocalTime(1177824835));
温馨提示:答案为网友推荐,仅供参考