fix(route/mihoyo/zzz): 调整到正确的时区 (#19861)
* fix(route/mihoyo/zzz): 在源时间中添加'+0800',调整到正确的时区 * fix(route/mihoyo/zzz): 使用 timezone 指定时区
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Route } from '@/types';
|
||||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
const categories = {
|
||||
'zh-cn': {
|
||||
@@ -94,7 +95,7 @@ async function handler(ctx) {
|
||||
title: item.sTitle,
|
||||
description: item.sContent,
|
||||
link: `${categories[location].link}/${item.iInfoId}`,
|
||||
pubDate: parseDate(item.dtStartTime),
|
||||
pubDate: timezone(parseDate(item.dtStartTime), +8), // 使用 timezone 工具指定时区 (+8是北京时间)
|
||||
category: item.sCategoryName,
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user