标签:second date localtime min seconds asc eth java local
function getLocalTime(time){ if(time > 0){ var dateStr = new Date(time * 1000); var str = "" + dateStr.getFullYear() + "-"; var m = dateStr.getMonth(); m = m < 10 ? "0" + m : m; str += m +"-"; var d = dateStr.getDate(); d = d < 10 ? "0" + d : d; str += d +" "; var H = dateStr.getHours(); H = H < 10 ? "0" + H : H; str += H+":"; var i = dateStr.getMinutes(); i = i < 10 ? "0" + i : i; str += i+":"; var s = dateStr.getSeconds(); s = s < 10 ? "0" + s : s; str += s; return str; }else{ return ‘末知时间‘; } }
标签:second date localtime min seconds asc eth java local
原文地址:http://www.cnblogs.com/hejianrong/p/6136837.html