fix: infzm timezone (#7695)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const got = require('@/utils/got');
|
||||
const timezone = require('@/utils/timezone');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
const baseUrl = 'http://www.infzm.com/contents';
|
||||
@@ -16,7 +17,8 @@ module.exports = async (ctx) => {
|
||||
const data = response.data.data;
|
||||
const resultItem = await Promise.all(
|
||||
data.contents.map(async ({ id, subject, author, publish_time }) => {
|
||||
const date = new Date(publish_time);
|
||||
// the timezone is GMT+8
|
||||
const date = timezone(publish_time, +8);
|
||||
const link = `http://www.infzm.com/contents/${id}`;
|
||||
let description = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user