From 2ef5a4d37b25fa18650b2f62534d0fbf4aee871e Mon Sep 17 00:00:00 2001 From: Skia Date: Fri, 30 Sep 2016 18:43:53 +0200 Subject: [PATCH] Runtime error fix --- counter/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/counter/views.py b/counter/views.py index 53c16e28..3a8bb554 100644 --- a/counter/views.py +++ b/counter/views.py @@ -927,6 +927,7 @@ class InvoiceCallView(CounterAdminTabsMixin, TemplateView): start_date = datetime.strptime(self.request.GET['month'], '%Y-%m') except: start_date = datetime(year=timezone.now().year, month=(timezone.now().month+10)%12+1, day=1) + start_date = start_date.replace(tzinfo=pytz.UTC) end_date = (start_date + timedelta(days=32)).replace(day=1, hour=0, minute=0, microsecond=0) from django.db.models import Sum, Case, When, F, DecimalField kwargs['start_date'] = start_date