let date = new Date(+new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
// console.log('当前时间', date)
一行代码获取当前时间
最新推荐文章于 2023-01-13 17:51:43 发布
let date = new Date(+new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
// console.log('当前时间', date)