mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
notify-260 remove server-side timezone handling
This commit is contained in:
@@ -6,7 +6,7 @@ from sqlalchemy import desc
|
||||
from app import db
|
||||
from app.dao.dao_utils import autocommit
|
||||
from app.models import Complaint
|
||||
from app.utils import get_local_midnight_in_utc
|
||||
from app.utils import get_midnight_in_utc
|
||||
|
||||
|
||||
@autocommit
|
||||
@@ -28,7 +28,7 @@ def fetch_complaints_by_service(service_id):
|
||||
|
||||
|
||||
def fetch_count_of_complaints(start_date, end_date):
|
||||
start_date = get_local_midnight_in_utc(start_date)
|
||||
end_date = get_local_midnight_in_utc(end_date + timedelta(days=1))
|
||||
start_date = get_midnight_in_utc(start_date)
|
||||
end_date = get_midnight_in_utc(end_date + timedelta(days=1))
|
||||
|
||||
return Complaint.query.filter(Complaint.created_at >= start_date, Complaint.created_at < end_date).count()
|
||||
|
||||
Reference in New Issue
Block a user