diff --git a/src/pretix/base/models/event.py b/src/pretix/base/models/event.py
index f8116bf578..de369926c1 100644
--- a/src/pretix/base/models/event.py
+++ b/src/pretix/base/models/event.py
@@ -179,6 +179,12 @@ class EventMixin:
self.date_to.astimezone(tz), ("D" if short else "l")
)
+ def is_same_day(self):
+ if not self.date_to:
+ return True
+ else:
+ return self.date_from.astimezone(self.timezone).date() == self.date_to.astimezone(self.timezone).date()
+
def get_date_range_display(self, tz=None, force_show_end=False, as_html=False, try_to_show_times=False) -> str:
"""
Returns a formatted string containing the start date and the end date
diff --git a/src/pretix/presale/templates/pretixpresale/event/fragment_subevent_list.html b/src/pretix/presale/templates/pretixpresale/event/fragment_subevent_list.html
index 52f5de8505..431cf840ac 100644
--- a/src/pretix/presale/templates/pretixpresale/event/fragment_subevent_list.html
+++ b/src/pretix/presale/templates/pretixpresale/event/fragment_subevent_list.html
@@ -20,7 +20,7 @@
{% trans "Time of day" %}
- {% if subev.event.settings.show_date_to and subev.date_to and subev.date_to.date == subev.date_from.date %}
+ {% if event.settings.show_date_to and subev.date_to and subev.is_same_day %}
–{% trans "until" context "timerange" %}
diff --git a/src/pretix/presale/templates/pretixpresale/organizers/index.html b/src/pretix/presale/templates/pretixpresale/organizers/index.html
index 7013b5693c..231f7111b7 100644
--- a/src/pretix/presale/templates/pretixpresale/organizers/index.html
+++ b/src/pretix/presale/templates/pretixpresale/organizers/index.html
@@ -67,7 +67,7 @@
{% icon "clock-o" %}
{% trans "Time of day" %}
- {% if e.settings.show_date_to and e.date_to and e.date_to.date == e.date_from.date %}
+ {% if e.settings.show_date_to and e.date_to and e.is_same_day %}
–{% trans "until" context "timerange" %}
{% endif %}