fix:修复 GitHub 时间转换错误

- 移除了 getTimezoneOffset() * 60 * 1000 的计算
-现在直接使用 utcDate.getTime() 获取时间戳
This commit is contained in:
spark 2025-02-07 11:21:05 +08:00
parent a6547db195
commit 6ff1b68f1b

View File

@ -163,10 +163,8 @@ EventsOn("updateVersion",async (msg) => {
const githubTimeStr = msg.published_at;
// Date
const utcDate = new Date(githubTimeStr);
//
const date = new Date(utcDate.getTime() + utcDate.getTimezoneOffset() * 60 * 1000);
const date = new Date(utcDate.getTime());
const year = date.getFullYear();
// getMonth 0 - 11 1
const month = String(date.getMonth() + 1).padStart(2, '0');