mirror of
https://github.com/ae-utbm/sith.git
synced 2025-11-23 05:07:00 +00:00
fix timezone issues
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
# OR WITHIN THE LOCAL FILE "LICENSE"
|
||||
#
|
||||
#
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timezone
|
||||
from urllib.parse import urlencode
|
||||
|
||||
from dateutil.relativedelta import relativedelta
|
||||
@@ -63,7 +63,8 @@ class InvoiceCallView(
|
||||
"""Add sums to the context."""
|
||||
kwargs = super().get_context_data(**kwargs)
|
||||
kwargs["months"] = Selling.objects.datetimes("date", "month", order="DESC")
|
||||
start_date = self.get_month()
|
||||
month = self.get_month()
|
||||
start_date = datetime(month.year, month.month, month.day, tzinfo=timezone.utc)
|
||||
end_date = start_date + relativedelta(months=1)
|
||||
|
||||
kwargs["sum_cb"] = Refilling.objects.filter(
|
||||
|
||||
Reference in New Issue
Block a user