Skip to content
Permalink
Browse files

Fix #2698 -- ensure post.updated is timezone-aware

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Mar 24, 2017
1 parent 60f7135 commit 96c6d1dc7863ebbce85f1137dfd773d15a8dd04f
Showing with 2 additions and 1 deletion.
  1. +1 −0 CHANGES.txt
  2. +1 −1 nikola/post.py
@@ -27,6 +27,7 @@ Features
Bugfixes
--------

* Ensure ``post.updated`` is timezone-aware (Issue #2698)
* Pass previously missing post object and language to reST compiler
and language to Markdown compiler (for shortcodes)
* Fix crashes when rendering subcategories (Issue #2681)
@@ -203,7 +203,7 @@ def __init__(
if 'updated' not in default_metadata:
default_metadata['updated'] = default_metadata.get('date', None)

self.updated = to_datetime(default_metadata['updated'])
self.updated = to_datetime(default_metadata['updated'], tzinfo)

if 'title' not in default_metadata or 'slug' not in default_metadata \
or 'date' not in default_metadata:

0 comments on commit 96c6d1d

Please sign in to comment.
You can’t perform that action at this time.