Skip to content

Commit

Permalink
Merge pull request #108 from springload/fix/event-landing-page
Browse files Browse the repository at this point in the history
fix datetime import
  • Loading branch information
sarahframe authored Jun 19, 2024
2 parents e3e06b8 + afcbe2f commit d825057
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cdhweb/events/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def upcoming(self):
day even if the start time is past."""
now = timezone.now()
# construct a datetime based on now but with zero hour/minute/second
today = datetime(
today = datetime.datetime(
now.year, now.month, now.day, tzinfo=timezone.get_default_timezone()
)
return self.filter(end_time__gte=today).order_by_start()
Expand All @@ -97,7 +97,7 @@ def recent(self):
with end date in the past."""
now = timezone.now()
# construct a datetime based on now but with zero hour/minute/second
today = datetime(
today = datetime.datetime(
now.year, now.month, now.day, tzinfo=timezone.get_default_timezone()
)
return self.filter(end_time__lt=today).order_by("-start_time")
Expand Down

0 comments on commit d825057

Please sign in to comment.