Skip to content

Commit

Permalink
fix(route): fix pubDate timezone for route e-hentai (#13774)
Browse files Browse the repository at this point in the history
* fix(e-hentai): fix pubDate timezone for non-GMT servers

* Update lib/v2/ehentai/ehapi.js

---------
  • Loading branch information
keocheung authored Nov 13, 2023
1 parent af11b7e commit 90b4940
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/v2/ehentai/ehapi.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const got = require('@/utils/got');
const logger = require('@/utils/logger');
const timezone = require('@/utils/timezone');
const cheerio = require('cheerio');
const path = require('path');
const config = require('@/config').value.ehentai;
Expand Down Expand Up @@ -76,7 +77,8 @@ async function parsePage(cache, data, get_bittorrent = false, embed_thumb = fals
async function parseElement(cache, element) {
const el = $(element);
const title = el.find('div.glink').html();
const pubDate = el.find('div[id^="posted_"]').html();
const rawDate = el.find('div[id^="posted_"]').text();
const pubDate = rawDate ? timezone(rawDate, 0) : rawDate;
let el_a;
let el_img;
// match layout
Expand Down

0 comments on commit 90b4940

Please sign in to comment.