Permalink
Browse files

Fix EntryQuerysetArchiveTodayTemplateResponseMixin when USE_TZ is False

  • Loading branch information...
1 parent 43d832d commit 14d31a4a14d4ad0351db39c9f38e54d8c16681e8 @Fantomas42 committed Apr 29, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 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])

0 comments on commit 14d31a4

Please sign in to comment.