fix: fetchTasks 开始时间往前 5 秒覆盖扫描操作

This commit is contained in:
liufumingren 2026-07-27 02:59:03 +08:00
parent 10f5193f23
commit 7903e34a9c

View File

@ -17,8 +17,8 @@ class HikvisionService extends BaseService {
const str = String(datetime).trim();
// 按 UTC 解析
const utc = new Date(str + 'Z');
// 转为北京时间
const cst = new Date(utc.getTime() + 8 * 3600000);
// 转为北京时间,往前 5 秒覆盖扫描操作
const cst = new Date(utc.getTime() + 8 * 3600000 - 5000);
return cst.toISOString().replace('Z', '+08:00');
}