Use local time zone setting for fake dates to prevent overlaps.

This commit is contained in:
Christopher Charbonneau Wells 2017-08-22 21:08:31 -04:00
parent 23acc006d4
commit c13914d6e2
1 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ class Command(BaseCommand):
child.save()
for j in range(0, days):
date = (timezone.now() - timedelta(days=j)).replace(
date = (timezone.localtime() - timedelta(days=j)).replace(
hour=0, minute=0, second=0)
self._add_child_data(child, date)
@ -58,7 +58,7 @@ class Command(BaseCommand):
)
def _add_child_data(self, child, date):
now = timezone.now()
now = timezone.localtime()
for i in (range(0, randint(5, 20))):
solid = choice([True, False])