Skip to content

Commit

Permalink
Fix #2698 -- ensure post.updated is timezone-aware
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Mar 24, 2017
1 parent 60f7135 commit 96c6d1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion nikola/post.py
Expand Up @@ -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:
Expand Down

0 comments on commit 96c6d1d

Please sign in to comment.