Skip to content
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

[BUG]Hugo平台的日期格式应加上时区 #1176

Closed
cesaryuan opened this issue Apr 18, 2024 · 0 comments
Closed

[BUG]Hugo平台的日期格式应加上时区 #1176

cesaryuan opened this issue Apr 18, 2024 · 0 comments
Assignees

Comments

@cesaryuan
Copy link
Contributor

当前生成的Hugo日期格式时这样的date:'2024-04-18 18:50:16' ,这里面没有标明时区,Hugo会把它的时区当成0时区,这样就导致Hugo认为这篇文章还没有到发布的时候,所以在构建时不会构建它,只有改成2024-04-18 18:50:16+08:002024-04-18T19:20:59+08:00才可以构建。

复现步骤:

hugo new site quickstart
cd quickstart
git init
hugo new content posts/my-first-post.md
# 去掉posts/my-first-post.md date后面的+08:00
hugo
# 发现posts/my-first-post.md没有被构建,加上+08:00问题消失
@cesaryuan cesaryuan changed the title 希望支持设置Hugo平台的日期格式 [BUG]Hugo平台的日期格式应加上时区 Apr 18, 2024
@terwer terwer self-assigned this Apr 22, 2024
@terwer terwer closed this as completed in 2ab1f07 Apr 22, 2024
terwer added a commit that referenced this issue Apr 22, 2024
terwer added a commit that referenced this issue Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants