mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #2464 from omnivore-app/fix/wechat-published-date
use asia/shanghai timezone to format published date in wechat articles
This commit is contained in:
commit
473cf2daa0
1 changed files with 4 additions and 4 deletions
|
|
@ -16,10 +16,10 @@ export class WeixinQqHandler extends ContentHandler {
|
|||
const publishTime = dom.querySelector('#publish_time')?.textContent
|
||||
if (publishTime) {
|
||||
const dateTimeFormat = 'yyyy-LL-dd HH:mm'
|
||||
const publishTimeISO = DateTime.fromFormat(
|
||||
publishTime,
|
||||
dateTimeFormat
|
||||
).toISO()
|
||||
// published time is in UTC+8
|
||||
const publishTimeISO = DateTime.fromFormat(publishTime, dateTimeFormat, {
|
||||
zone: 'Asia/Shanghai',
|
||||
}).toISO()
|
||||
|
||||
// create a meta node to store the publish time in ISO format
|
||||
const metaNode = dom.createElement('meta')
|
||||
|
|
|
|||
Loading…
Reference in a new issue