时间字符串与时间戳的相互转换

 const currentTime = Date.now();
 console.log(currentTime);
 var timestamp7 = Date.parse(
    new Date("2025-9-12 15:27:00".replace(/-/g, "/"))
   );
 console.log(timestamp7);

 

posted @ 2025-09-12 15:36  ThisCall  阅读(9)  评论(0)    收藏  举报