diff options
| -rw-r--r-- | pelican/contents.py | 3 | ||||
| -rw-r--r-- | pelican/tests/output/basic/drafts/a-draft-article.html | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/pelican/contents.py b/pelican/contents.py index 620fa304..40d9c28e 100644 --- a/pelican/contents.py +++ b/pelican/contents.py @@ -121,6 +121,7 @@ class Content(object): # manage timezone default_timezone = settings.get('TIMEZONE', 'UTC') timezone = getattr(self, 'timezone', default_timezone) + self.timezone = pytz.timezone(timezone) if hasattr(self, 'date'): self.date = set_date_tzinfo(self.date, timezone) @@ -512,7 +513,7 @@ class Article(Content): # if we are a draft and there is no date provided, set max datetime if not hasattr(self, 'date') and self.status == 'draft': - self.date = datetime.datetime.max + self.date = datetime.datetime.max.replace(tzinfo=self.timezone) def _expand_settings(self, key): klass = 'draft' if self.status == 'draft' else 'article' diff --git a/pelican/tests/output/basic/drafts/a-draft-article.html b/pelican/tests/output/basic/drafts/a-draft-article.html index e8f337e3..1e5eb5ba 100644 --- a/pelican/tests/output/basic/drafts/a-draft-article.html +++ b/pelican/tests/output/basic/drafts/a-draft-article.html @@ -30,7 +30,7 @@ <div class="entry-content"> <footer class="post-info"> - <abbr class="published" title="9999-12-31T23:59:59.999999"> + <abbr class="published" title="9999-12-31T23:59:59.999999+00:00"> Published: </abbr> |
