We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hexo的_config.yml里已经设置了timezone: Asia/Shanghai,但发表时间为0:00-8:00的文章,会显示为在前一天发表。比如,文章的front-matter有
_config.yml
timezone: Asia/Shanghai
date: "2015-05-24 04:50"
在页面里,发表时间就会显示为2015-05-23。
用hexo自带的landscape主题则不会出现这个问题。
试了下,在layout\_macro\post.swig:
layout\_macro\post.swig
29 - | {{ __('post.posted') }} {{ post.date | date('Y-m-d') }} 29 + | {{ __('post.posted') }} {{ date(post.date, 'YYYY-MM-DD') }}
似乎就能解决这个问题,不过不熟悉swig没有深究原因。
The text was updated successfully, but these errors were encountered:
Thanks. @tgmerge
原本使用 Swig 的 date filter 没有传递任何 Timezone 的信息导致的。将替换成 Hexo 的 date helper。
Sorry, something went wrong.
Bug: Date does not apply to corresponding Timezone if using swig date…
14f1a34
… filter. #181.
Fix iissnan#181 and iissnan#333 (iissnan#534)
5dfe82c
* Fix iissnan#181 * Fix iissnan#181
No branches or pull requests
Hexo的
_config.yml
里已经设置了timezone: Asia/Shanghai
,但发表时间为0:00-8:00的文章,会显示为在前一天发表。比如,文章的front-matter有在页面里,发表时间就会显示为2015-05-23。
用hexo自带的landscape主题则不会出现这个问题。
试了下,在
layout\_macro\post.swig
:似乎就能解决这个问题,不过不熟悉swig没有深究原因。
The text was updated successfully, but these errors were encountered: