mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-31 11:48:51 -04:00
notify-260 remove server-side timezone handling
This commit is contained in:
@@ -17,7 +17,7 @@ from app.errors import InvalidRequest, register_errors
|
||||
from app.platform_stats.platform_stats_schema import platform_stats_request
|
||||
from app.schema_validation import validate
|
||||
from app.service.statistics import format_admin_stats
|
||||
from app.utils import get_local_midnight_in_utc
|
||||
from app.utils import get_midnight_in_utc
|
||||
|
||||
platform_stats_blueprint = Blueprint('platform_stats', __name__)
|
||||
|
||||
@@ -54,8 +54,8 @@ def validate_date_range_is_within_a_financial_year(start_date, end_date):
|
||||
if end_date < start_date:
|
||||
raise InvalidRequest(message="Start date must be before end date", status_code=400)
|
||||
|
||||
start_fy = get_financial_year_for_datetime(get_local_midnight_in_utc(start_date))
|
||||
end_fy = get_financial_year_for_datetime(get_local_midnight_in_utc(end_date))
|
||||
start_fy = get_financial_year_for_datetime(get_midnight_in_utc(start_date))
|
||||
end_fy = get_financial_year_for_datetime(get_midnight_in_utc(end_date))
|
||||
|
||||
if start_fy != end_fy:
|
||||
raise InvalidRequest(message="Date must be in a single financial year.", status_code=400)
|
||||
|
||||
Reference in New Issue
Block a user