File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626import yaml
2727
2828from babel .dates import format_date , format_datetime
29- from datetime import datetime
29+ from datetime import datetime , timezone
3030from jinja2 import pass_context
3131from jinja2 .runtime import Context
3232from mkdocs .config .defaults import MkDocsConfig
@@ -370,7 +370,7 @@ def _is_excluded(self, post: Post):
370370 # and must be explicitly enabled by the author.
371371 if not isinstance (post .config .draft , bool ):
372372 if self .config .draft_if_future_date :
373- return post .config .date .created > datetime .now ()
373+ return post .config .date .created > datetime .now (timezone . utc )
374374
375375 # Post might be a draft
376376 return bool (post .config .draft )
Original file line number Diff line number Diff line change 2626import yaml
2727
2828from babel .dates import format_date , format_datetime
29- from datetime import datetime
29+ from datetime import datetime , timezone
3030from jinja2 import pass_context
3131from jinja2 .runtime import Context
3232from mkdocs .config .defaults import MkDocsConfig
@@ -370,7 +370,7 @@ def _is_excluded(self, post: Post):
370370 # and must be explicitly enabled by the author.
371371 if not isinstance (post .config .draft , bool ):
372372 if self .config .draft_if_future_date :
373- return post .config .date .created > datetime .now ()
373+ return post .config .date .created > datetime .now (timezone . utc )
374374
375375 # Post might be a draft
376376 return bool (post .config .draft )
You can’t perform that action at this time.
0 commit comments