File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 26
26
import yaml
27
27
28
28
from babel .dates import format_date , format_datetime
29
- from datetime import datetime
29
+ from datetime import datetime , timezone
30
30
from jinja2 import pass_context
31
31
from jinja2 .runtime import Context
32
32
from mkdocs .config .defaults import MkDocsConfig
@@ -370,7 +370,7 @@ def _is_excluded(self, post: Post):
370
370
# and must be explicitly enabled by the author.
371
371
if not isinstance (post .config .draft , bool ):
372
372
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 )
374
374
375
375
# Post might be a draft
376
376
return bool (post .config .draft )
Original file line number Diff line number Diff line change 26
26
import yaml
27
27
28
28
from babel .dates import format_date , format_datetime
29
- from datetime import datetime
29
+ from datetime import datetime , timezone
30
30
from jinja2 import pass_context
31
31
from jinja2 .runtime import Context
32
32
from mkdocs .config .defaults import MkDocsConfig
@@ -370,7 +370,7 @@ def _is_excluded(self, post: Post):
370
370
# and must be explicitly enabled by the author.
371
371
if not isinstance (post .config .draft , bool ):
372
372
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 )
374
374
375
375
# Post might be a draft
376
376
return bool (post .config .draft )
You can’t perform that action at this time.
0 commit comments