[英]How to convert a timestamp in correct object of date?
How to convert a timestamp in correct object of date? 如何在正确的日期对象中转换时间戳?
4 opinion for choose: 4意见选择:
new Date(timestamp) 新日期(时间戳)
new Date(timestamp * 1000) 新日期(时间戳* 1000)
parseDate(timestamp) parseDate(时间戳)
Date.parse(timestamp) Date.parse(时间戳)
接受的解决方案是谈论JavaScript对象的UNIX时间戳
var date = new Date(parseInt(jsonDate.substr(6)));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.