Commit 544934ae authored by duanjinfei's avatar duanjinfei

fix timestamp

parent e75ff1a0
...@@ -35,14 +35,9 @@ async function fetchAllData(supabase, table: string, pageSize: number = 1000) { ...@@ -35,14 +35,9 @@ async function fetchAllData(supabase, table: string, pageSize: number = 1000) {
} }
const getTimestampForMidnight3AM = () => { const getTimestampForMidnight3AM = () => {
// 获取当前时间 const timestamp = Math.floor(Date.now() / 3600000) * 3600; // 计算整点的时间戳
const now = new Date(); return timestamp
// 设置为当天凌晨3点
const threeAM = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 3, 0, 0);
// 返回时间戳(单位:秒)
return Math.floor(threeAM.getTime() / 1000);
}; };
Deno.serve(async (req) => { Deno.serve(async (req) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment