-
Notifications
You must be signed in to change notification settings - Fork 3.5k
设置上海时区后,0:00-8:00的文章仍然显示为前一天发表 #181
Copy link
Copy link
Closed
Description
Hexo的_config.yml里已经设置了timezone: Asia/Shanghai,但发表时间为0:00-8:00的文章,会显示为在前一天发表。比如,文章的front-matter有
date: "2015-05-24 04:50"
在页面里,发表时间就会显示为2015-05-23。
用hexo自带的landscape主题则不会出现这个问题。
试了下,在layout\_macro\post.swig:
29 - | {{ __('post.posted') }} {{ post.date | date('Y-m-d') }}
29 + | {{ __('post.posted') }} {{ date(post.date, 'YYYY-MM-DD') }}
似乎就能解决这个问题,不过不熟悉swig没有深究原因。
Reactions are currently unavailable