Replace timezone.now() usage with localtime.

This commit is contained in:
Christopher Charbonneau Wells 2017-08-22 21:36:44 -04:00
parent c4147af34d
commit e3b73d53c5
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ def card_diaperchange_types(child):
"""Diaper change statistics for the last seven days including today."""
stats = OrderedDict()
for x in range(0, 7):
date = (timezone.now() - timezone.timedelta(days=x)).date()
date = (timezone.localtime() - timezone.timedelta(days=x)).date()
stats[date] = {'wet': 0, 'solid': 0}
instances = DiaperChange.objects.filter(
@ -58,7 +58,7 @@ def card_tummytime_last(child):
@register.inclusion_tag('cards/tummytime_day.html')
def card_tummytime_day(child, date=timezone.now().date()):
def card_tummytime_day(child, date=timezone.localtime().date()):
instances = TummyTime.objects.filter(
child=child, end__day=date.day).order_by('-end')
stats = {