fix(uigf): incorrect timezone

This commit is contained in:
Zichao Lin 2024-07-23 12:51:22 +08:00
parent 2f14a4d320
commit 2814ed211b
Signed by: earthjasonlin
GPG Key ID: 406D9913DE2E42FB

@ -23,6 +23,15 @@ const start = async () => {
if (!data.result.size) { if (!data.result.size) {
throw new Error('数据为空') 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 = { const result = {
info: { info: {
export_timestamp: Math.ceil(Date.now() / 1000), export_timestamp: Math.ceil(Date.now() / 1000),
@ -33,7 +42,7 @@ const start = async () => {
nap: [ nap: [
{ {
uid: current, uid: current,
timezone: data.region_time_zone, timezone: timezone,
lang: data.lang, lang: data.lang,
list: [] list: []
} }