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

Setting timezone in config.yml doesn't work as expected #4239

Open
4 tasks done
alexschneider opened this issue Apr 11, 2020 · 2 comments
Open
4 tasks done

Setting timezone in config.yml doesn't work as expected #4239

alexschneider opened this issue Apr 11, 2020 · 2 comments
Labels
bug Something isn't working dates

Comments

@alexschneider
Copy link

Check List

Please check followings before submitting a new issue.

  • I have already read Docs page & Troubleshooting page
  • I have already searched existing issues and they are not help to me
  • [n/a] I examined error or warning messages and it's difficult to solve
  • Using the latest version of Hexo (run hexo version to check)
  • Node.js is higher than 8.6.0

Expected behavior

Timezone gets set to UTC

Actual behavior

Timezone remains local time

How to reproduce?

  • Set timezone to UTC in _config.yml
  • Change date_format to date_format: YYYY-MM-DDTHH:mm:ss.SSSZ
  • Write a post using a timezone
  • When I load it up, the timezone is -0700 for me as I am currently in PDT, expect Z or +0000

Environment & Settings

Node.js & npm version

> hexo version
hexo: 4.2.0
hexo-cli: 3.1.0
os: Windows_NT 10.0.18362 win32 x64
node: 13.7.0
v8: 7.9.317.25-node.28
uv: 1.34.1
zlib: 1.2.11
brotli: 1.0.7
ares: 1.15.0
modules: 79
nghttp2: 1.40.0
napi: 5
llhttp: 2.0.1
openssl: 1.1.1d
cldr: 36.0
icu: 65.1
tz: 2019c
unicode: 12.1

Your site _config.yml (Optional)

Your theme _config.yml (Optional)

Hexo and Plugin version(npm ls --depth 0)

+-- hexo@4.2.0
+-- hexo-deployer-git@2.1.0
+-- hexo-generator-alias@0.1.3
+-- hexo-generator-archive@1.0.0
+-- hexo-generator-category@1.0.0
+-- hexo-generator-tag@1.0.0
+-- hexo-renderer-ejs@1.0.0
+-- hexo-renderer-marked@2.0.0
+-- hexo-renderer-stylus@1.1.0
`-- hexo-server@1.0.0

Your package.json package.json

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "hexo generate",
    "clean": "hexo clean",
    "deploy": "hexo deploy",
    "server": "hexo server"
  },
  "hexo": {
    "version": "4.2.0"
  },
  "dependencies": {
    "hexo": "^4.0.0",
    "hexo-deployer-git": "^2.1.0",
    "hexo-generator-alias": "^0.1.3",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-tag": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-marked": "^2.0.0",
    "hexo-renderer-stylus": "^1.1.0",
    "hexo-server": "^1.0.0"
  }
}

Others

@stale
Copy link

stale bot commented Jun 11, 2020

This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 11, 2020
@SukkaW
Copy link
Member

SukkaW commented Jun 12, 2020

Unstale

@stale stale bot removed the stale label Jun 12, 2020
@SukkaW SukkaW added the bug Something isn't working label Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dates
Projects
None yet
Development

No branches or pull requests

3 participants