const timeDate = 2021-08-24T02:29:01.282Z
function rTime(timeDate) {
var json_date = new Date(timeDate).toJSON();
return new Date(+new Date(json_date) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{
3}Z/, '')
}
2021-08-24T02:29:01.282Z 日期格式转换为:2021-08-24 10:29:01
猜你喜欢
转载自blog.csdn.net/qq_37148353/article/details/119892385
今日推荐
周排行