From 2814ed211bf39b2133ab327752b4a43cf73002bc Mon Sep 17 00:00:00 2001 From: Zichao Lin Date: Tue, 23 Jul 2024 12:51:22 +0800 Subject: [PATCH] fix(uigf): incorrect timezone --- src/main/UIGFJson.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/UIGFJson.js b/src/main/UIGFJson.js index 6510d6e..a1e59da 100644 --- a/src/main/UIGFJson.js +++ b/src/main/UIGFJson.js @@ -23,6 +23,15 @@ const start = async () => { if (!data.result.size) { throw new Error('数据为空') } + const serverTimeZone = new Map([ + ["prod_gf_cn", 8] + ]) + + let timezone + timezone = serverTimeZone.get(data.region) + if(!timezone) { + throw new Error('服务器时区不支持') + } const result = { info: { export_timestamp: Math.ceil(Date.now() / 1000), @@ -33,7 +42,7 @@ const start = async () => { nap: [ { uid: current, - timezone: data.region_time_zone, + timezone: timezone, lang: data.lang, list: [] }