mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-04 16:11:11 -04:00
Always use 12h times
The GOV.UK content style guide says: > - 5:30pm (not 1730hrs) > - midnight (not 00:00) > - midday (not 12 noon, noon or 12pm) This commit changes all times to be 12h not 24h, and adds a special case for when a time is exactly 12:00am or 12:00pm.
This commit is contained in:
@@ -89,7 +89,7 @@ def get_errors_for_csv(recipients, template_type):
|
||||
|
||||
|
||||
def generate_notifications_csv(json_list):
|
||||
from app import format_datetime, format_notification_status
|
||||
from app import format_datetime_24h, format_notification_status
|
||||
content = StringIO()
|
||||
retval = None
|
||||
with content as csvfile:
|
||||
@@ -103,7 +103,7 @@ def generate_notifications_csv(json_list):
|
||||
x['template']['template_type'],
|
||||
x['job']['original_file_name'] if x['job'] else '',
|
||||
format_notification_status(x['status'], x['template']['template_type']),
|
||||
format_datetime(x['created_at'])])
|
||||
format_datetime_24h(x['created_at'])])
|
||||
retval = content.getvalue()
|
||||
return retval
|
||||
|
||||
|
||||
Reference in New Issue
Block a user