squidfunk / mkdocs-material

Documentation that simply works
https://squidfunk.github.io/mkdocs-material/
MIT License
21.16k stars 3.57k forks source link

Normalize datetime values to UTC in blog plugin #7708

Closed perpil closed 1 week ago

perpil commented 1 week ago

Fixes #7705

Normalize datetime values to UTC in blog plugin to make the datetime object offset-aware.


For more details, open the Copilot Workspace session.

vedranmiletic commented 1 week ago

FWIW, in MkDocs itself, a similar issue with timezones mkdocs/mkdocs#3794 was resolved in roughly the same way mkdocs/mkdocs#3795 several months ago.

squidfunk commented 1 week ago

Thanks for the PR, and @vedranmiletic for linking the related issue. Looks sensible!

squidfunk commented 1 week ago

Ah, one problem: please make the changes in the src folder as well. The material folder is built from it, as mentioned in our theme development guide:

[!WARNING] Never make any changes in the material directory, as the contents of this directory are automatically generated from the src directory and will be overwritten when the theme is built.

perpil commented 1 week ago

Ah! I'd forgotten since last time. I've updated the PR to only modify the src.

squidfunk commented 1 week ago

Thanks!