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:
Chris Hill-Scott
2016-08-26 08:06:28 +01:00
parent c1415c0429
commit 3d8d160d3e
5 changed files with 37 additions and 14 deletions

View File

@@ -25,7 +25,7 @@ def test_email_safe_return_dot_separated_email_domain():
('permanent-failure', 'sms', 'Phone number doesnt exist')
]
)
@freeze_time("2016-01-01 11:09:00.061258")
@freeze_time("2016-01-01 15:09:00.061258")
def test_generate_csv_from_notifications(
app_,
service_one,
@@ -46,5 +46,5 @@ def test_generate_csv_from_notifications(
)
for row in DictReader(StringIO(csv_content)):
assert row['Time'] == 'Friday 01 January 2016 at 11:09'
assert row['Time'] == 'Friday 01 January 2016 at 15:09'
assert row['Status'] == expected_status