mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 14:31:57 -05:00
Bump notifications-utils to 3.7.0
Bumped notifications-utils to 3.7.0. Version 3.7.0 includes the `convert_utc_to_bst` and `convert_bst_to_utc` functions and the `LETTER_PROCESSING_DEADLINE` constant, so these have been removed from this repo and anywhere using these has now been updated to get these from `notifications-utils`. Also bumped pytest by a patch version to bring in a bug fix.
This commit is contained in:
@@ -4,6 +4,7 @@ import pytz
|
||||
from flask import url_for
|
||||
from sqlalchemy import func
|
||||
from notifications_utils.template import SMSMessageTemplate, WithSubjectTemplate
|
||||
from notifications_utils.timezones import convert_utc_to_bst
|
||||
|
||||
local_timezone = pytz.timezone("Europe/London")
|
||||
|
||||
@@ -51,14 +52,6 @@ def get_midnight_for_day_before(date):
|
||||
return get_london_midnight_in_utc(day_before)
|
||||
|
||||
|
||||
def convert_utc_to_bst(utc_dt):
|
||||
return pytz.utc.localize(utc_dt).astimezone(local_timezone).replace(tzinfo=None)
|
||||
|
||||
|
||||
def convert_bst_to_utc(date):
|
||||
return local_timezone.localize(date).astimezone(pytz.UTC).replace(tzinfo=None)
|
||||
|
||||
|
||||
def get_london_month_from_utc_column(column):
|
||||
"""
|
||||
Where queries need to count notifications by month it needs to be
|
||||
|
||||
Reference in New Issue
Block a user