Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix EntryQuerysetArchiveTodayTemplateResponseMixin when USE_TZ is False

  • Loading branch information...
commit 14d31a4a14d4ad0351db39c9f38e54d8c16681e8 1 parent 43d832d
@Fantomas42 authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 zinnia/views/mixins/templates.py
View
5 zinnia/views/mixins/templates.py
@@ -137,5 +137,8 @@ def get_archive_part_value(self, part):
'week': self.week_format,
'day': '%d'}
if self.today is None:
- self.today = timezone.localtime(timezone.now()).date()
+ today = timezone.now()
+ if timezone.is_aware(today):
+ today = timezone.localtime(today)
+ self.today = today
return self.today.strftime(parts_dict[part])
Please sign in to comment.
Something went wrong with that request. Please try again.