mirror of
https://github.com/pretix/pretix.git
synced 2026-05-18 17:24:03 +00:00
Fix calendar before-date to check for events (#5608)
This commit is contained in:
committed by
GitHub
parent
8c01cad06b
commit
818bb76e89
@@ -689,7 +689,7 @@ class EventIndex(EventViewMixin, EventListMixin, CartMixin, TemplateView):
|
||||
self._set_month_year()
|
||||
tz = self.request.event.timezone
|
||||
_, ndays = calendar.monthrange(self.year, self.month)
|
||||
before = datetime(self.year, self.month, 1, 0, 0, 0, tzinfo=tz) - timedelta(days=1)
|
||||
before = datetime(self.year, self.month, 1, 23, 59, 59, tzinfo=tz) - timedelta(days=1)
|
||||
after = datetime(self.year, self.month, ndays, 0, 0, 0, tzinfo=tz) + timedelta(days=1)
|
||||
|
||||
if self.request.event.settings.event_calendar_future_only:
|
||||
@@ -750,7 +750,7 @@ class EventIndex(EventViewMixin, EventListMixin, CartMixin, TemplateView):
|
||||
tz = self.request.event.timezone
|
||||
week = isoweek.Week(self.year, self.week)
|
||||
before = datetime(
|
||||
week.monday().year, week.monday().month, week.monday().day, 0, 0, 0, tzinfo=tz
|
||||
week.monday().year, week.monday().month, week.monday().day, 23, 59, 59, tzinfo=tz
|
||||
) - timedelta(days=1)
|
||||
after = datetime(
|
||||
week.sunday().year, week.sunday().month, week.sunday().day, 0, 0, 0, tzinfo=tz
|
||||
|
||||
Reference in New Issue
Block a user