Skip to content

Commit

Permalink
Revert "try a fix for overdue time zone mismatch"
Browse files Browse the repository at this point in the history
This reverts commit 5bed169.
  • Loading branch information
jtf621 committed Jan 8, 2018
1 parent 5bed169 commit 4207be4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions schools/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def due_date(self):
tz = self.created_at.tzinfo
if (self.created_at < timezone.datetime(2018, 1, 7, tzinfo=tz) and
self.created_at > timezone.datetime(2017, 12, 30, tzinfo=tz)):
hard_coded_due_date = timezone.datetime(2018, 1, 8, tzinfo=tz)
hard_coded_due_date = timezone.datetime(2018, 1, 9, tzinfo=tz)
return hard_coded_due_date.date()
return (self.created_at + datetime.timedelta(30)).date()

Expand All @@ -314,8 +314,8 @@ def percent_complete(self):
return float('%.2f' % (filled_fields/len(field_names)*100))

def overdue(self):
tz = self.created_at.tzinfo
tomorrow = (timezone.localtime(timezone=tz) + datetime.timedelta(days=1)).date()
tomorrow = (timezone.now() + datetime.timedelta(days=2)).date()
return False # HACK
return self.due_date() < tomorrow

def url(self):
Expand Down

0 comments on commit 4207be4

Please sign in to comment.