时间戳(timestamp)是从1970年1月1日北京时间08:00:00起至今的秒数/毫秒数
const now = new Date();
console.log("Mon Nov 17 2025 15:36:35 GMT+0800 (中国标准时间)", now);
let temp = new Date(now.getTime() - 90 * 24 * 60 * 60 * 1000);
console.log("Sat Oct 18 2025 15:36:35 GMT+0800 (中国标准时间)", temp);
temp.setHours(0, 0, 0, 0); // 设置为当天零点
console.log("Sat Oct 18 2025 00:00:00 GMT+0800 (中国标准时间)", temp);
const timestamp = Math.floor(temp.getTime() / 1000);
console.log("1760716800", timestamp);
813

被折叠的 条评论
为什么被折叠?



