mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
Update all dates to use utc, only in the template is it converted to british time.
This commit is contained in:
@@ -109,7 +109,7 @@ def weekly(service_id):
|
||||
date_from=earliest_date
|
||||
)['data']
|
||||
),
|
||||
now=datetime.now()
|
||||
now=datetime.utcnow()
|
||||
)
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ def add_rates_to(delivery_statistics):
|
||||
if delivery_statistics['sms_requested'] else 0
|
||||
),
|
||||
week_end_datetime=parser.parse(
|
||||
delivery_statistics.get('week_end', str(datetime.now()))
|
||||
delivery_statistics.get('week_end', str(datetime.utcnow()))
|
||||
),
|
||||
**delivery_statistics
|
||||
)
|
||||
|
||||
@@ -81,7 +81,7 @@ def _do_registration(form, service=None, send_sms=True, send_email=True):
|
||||
|
||||
if send_sms:
|
||||
user_api_client.send_verify_code(user.id, 'sms', user.mobile_number)
|
||||
session['expiry_date'] = str(datetime.now() + timedelta(hours=1))
|
||||
session['expiry_date'] = str(datetime.utcnow() + timedelta(hours=1))
|
||||
session['user_details'] = {"email": user.email_address, "id": user.id}
|
||||
return True
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user