auroral-ui / hexo-theme-aurora

🏳️‍🌈 Futuristic auroral Hexo theme.
https://blog.bennyxguo.com
MIT License
1.33k stars 211 forks source link

New Post Date/Time doesn't match set timezone #445

Closed itsmingyoo closed 4 weeks ago

itsmingyoo commented 4 weeks ago

Discussed in https://github.com/auroral-ui/hexo-theme-aurora/discussions/444

Originally posted by **itsmingyoo** June 2, 2024 Hello, I have an issue with the date/time of the post being incorrect. Let me elaborate My _config.yml has 'timezone: America/Los_Angeles' set. When I create a new post it has the following (using this time as an example): `---` `title: Test Post for Date/Time` `date: 2024-06-02 17:00:00` `tags:` `---` The post rendered on the browser shows the date to be 06-03-2024 when it should only do that at 2024-06-02 24:00:00 or 2024-06-03 00:00:00. I noticed that in the themes/aurora/src/models that the Article & Page class files aren't parsing the correct time but only grabbing UTC time which may be the issue. I'm not sure if this is a problem with hexo.io itself incorrectly parsing date/time or with the theme, but is there proper approach to solve this or a current solution to this?