mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
use asia/shanghai timezone to format published date in wechat articles
This commit is contained in:
parent
ccc69d01d5
commit
a818fa721c
1 changed files with 3 additions and 4 deletions
|
|
@ -16,10 +16,9 @@ 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()
|
||||
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