new Date(parseInt(data.substring(6, data.length - 2))).toLocaleDateString();
我这里的data记得替换成你的数据,在过滤器中写入代码后引用,根据时间戳来替换现在的时间
还有一种办法
在js中可以这样写
var time = Math.round(new Date() / 1000); new Date(parseInt(time * 1000)).toLocaleDateString();
这样式把当前时间写入数据库中。