-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
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
Possible dates bug lib/plugins/processor/post.js #3397
Comments
Was just about to post an issue regarding this, glad to see it's probably because of my timezone (Pacific/Auckland). A post made on the 19th of November is showing the post.date being 4th of November, all other dates are off too, although most are just off by one. Here's a link to my repo - https://github.com/puremana/personal-blog |
@puremana Thank you for adding your experience with this as I am investigating the dates and timezones! |
I'm not yet investigate, but #3282 is possibility that same problem. |
Thank you, @yoshinorin. I will search for all the places with timezone and see what else it's used for. Then I will make a PR to fix it. It's actually been there since the beginning. lol |
I tried for a while but I did not come to a solution. I will try again tomorrow. |
@tcrowe any luck? |
No, @puremana. For now all we can do is ask people to disable(comment or delete) the When I was looking at the code I couldn't figure out the original intention so I need to think about the implications. Was it true that if you disable the |
Sorry, it turns out timezone doesn't change anything at all in my project, even when it should be. My bug was something else, thanks for all of your help |
See: hexojs/hexo#3397 We will need to use a redirect plugin and supply aliases for already published posts: https://github.com/hexojs/hexo-generator-alias
See: hexojs/hexo#3397 We will need to use a redirect plugin and supply aliases for already published posts: https://github.com/hexojs/hexo-generator-alias
In this issue we found that if the user sets
timezone:
in their_config.yml
the date is modified and can be different than what they expect.#3365
See this code here:
https://github.com/hexojs/hexo/blame/master/lib/plugins/processor/post.js#L78
https://github.com/hexojs/hexo/blame/90b107c8b0bd8b386f64463403391f67eb1b2535/lib/plugins/processor/post.ts#L123
if timezone then change date
I'm not certain if this is a bug or not so I need help to understand.
How to test
View markdown dates and then view post dates in browser
Set
timezone: Asia/Shanghai
inside./_config.yml
hexo clean && hexo serve
Repeat 2
If you do that you should notice the same date changes reported in #3365. Is this a bug or should hexo be changing the date relative to GMT or location?
Thanks for taking a look
The text was updated successfully, but these errors were encountered: