timvink / mkdocs-git-revision-date-localized-plugin

MkDocs plugin to add a last updated date to your site pages
https://timvink.github.io/mkdocs-git-revision-date-localized-plugin/index.html
MIT License
206 stars 44 forks source link

Use time.time() to obtain unix timestamp #27

Closed biochimia closed 4 years ago

biochimia commented 4 years ago

datetime.utcnow() returns an instance with no timezone information, and calling timestamp() on it applies a local to UTC conversion again. time.time() returns a unix timestamp directly, so there's no need to deal with UTC or timezone offsets.

timvink commented 4 years ago

More elegant indeed, thanks!

As it's a very minor tweak I will include it in the next release, which is not planned yet.