File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ date_utils.py (get a range covering the entire current month)
5959` ` ` python
6060from django.utils import timezone
6161from dateutil.relativedelta import relativedelta
62- from psycopg2.extras import DateTimeRange
62+ from psycopg2.extras import DateTimeTZRange
6363
6464def get_month_range ():
6565 " " " Return a DateTimeRange range covering this entire month" " "
@@ -68,7 +68,7 @@ def get_month_range():
6868 today += timezone.timedelta(7)
6969 this_month_start = today.replace(day=1)
7070 next_month_start = this_month_start + relativedelta(months=1)
71- return DateTimeRange (this_month_start, next_month_start)
71+ return DateTimeTZRange (this_month_start, next_month_start)
7272` ` `
7373
7474views.py
@@ -104,7 +104,7 @@ def overall_dates_of_funded_events(request):
104104 context = Event.objects.filter(is_funded=True).aggregate(
105105 output=Aggregate(F(" period" ), function=" range_merge" )
106106 )
107- # Example result: {'output': DateTimeRange("2022-10-01", "2022-12-07", '[)')}
107+ # Example result: {'output': DateTimeRange("2022-10-01 02:00:00 ", "2022-12-07 12:00:00 ", '[)')}
108108
109109 return TemplateResponse(request, template, context)
110110
You can’t perform that action at this time.
0 commit comments