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

permalink date is incorrect if the time zone of _config.yml and the time zone setting of the machine are different #3282

Open
MatchaChoco010 opened this Issue Oct 11, 2018 · 2 comments

Comments

2 participants
@MatchaChoco010

MatchaChoco010 commented Oct 11, 2018

Environment Info

Node version(node -v):v10.9.0

site to reproduce the ploblem:

https://github.com/MatchaChoco010/hexo-timezone-permalink

$ hexo version
hexo: 3.7.1
hexo-cli: 1.1.0
os: Linux 4.4.0-17134-Microsoft linux x64
http_parser: 2.8.0
node: 10.9.0
v8: 6.8.275.24-node.14
uv: 1.22.0
zlib: 1.2.11
ares: 1.14.0
modules: 64
nghttp2: 1.32.0
napi: 3
openssl: 1.1.0i
icu: 62.1
unicode: 11.0
cldr: 33.1
tz: 2018e

For BUG

_config.yml is this:

...
timezone: America/New_York
...
permalink: :year/:month/:day/:title/
...

and source/_posts/test.md is this:

---
title: test
date: 2018-10-11 23:00:00
tags:
---

The permalink of this article should be /2018/10/11/test/.
But hexo generate in Japan, which +0900, /2018/10/12/test/index.html is generated.

screenshot0

The article date is correct (2018/10/11).

screenshot1

Change the machine timezone to -0500 and hexo generate, /2018/10/11/test.index.html is generated.

It seems that the permalink is not generated correctly if the time zone of _config.yml and the time zone setting of the machine are incorrect.

@YoshinoriN

This comment has been minimized.

Show comment
Hide comment
@YoshinoriN

YoshinoriN Oct 14, 2018

Member

@MatchaChoco010
Thanks a report. I reproduced it.
But, I can't judge fix this behavior or not. I think this problem impact is big.

I ask to other hexo maintainer this problem.

Member

YoshinoriN commented Oct 14, 2018

@MatchaChoco010
Thanks a report. I reproduced it.
But, I can't judge fix this behavior or not. I think this problem impact is big.

I ask to other hexo maintainer this problem.

@YoshinoriN

This comment has been minimized.

Show comment
Hide comment
@YoshinoriN

YoshinoriN Oct 14, 2018

Member

@tommy351 @NoahDragon @JLHwung
How do you think about this.

Member

YoshinoriN commented Oct 14, 2018

@tommy351 @NoahDragon @JLHwung
How do you think about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment