Convert frontend display to be just UTC (#540)

This changeset converts the display of dates and times to be just UTC to match the recent changes in the backend.  This unwinds a bit of work that was done previously and allows us to start with a clean slate in how we want to approach displaying dates and times going forward. It also adds a bit of explanatory text to help users.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
Co-authored-by: stvnrlly <steven.reilly@gsa.gov>
This commit is contained in:
Carlo Costino
2023-06-12 15:49:48 -04:00
committed by GitHub
parent da623c87d6
commit 92d25f5a69
19 changed files with 114 additions and 110 deletions

View File

@@ -4,28 +4,28 @@ from freezegun import freeze_time
from app.main.forms import ChooseTimeForm
@freeze_time("2016-01-01 16:09:00.061258")
@freeze_time("2016-01-01 11:09:00.061258")
def test_form_contains_next_24h(notify_admin):
choices = ChooseTimeForm().scheduled_for.choices
# Friday
assert choices[0] == ('', 'Now')
assert choices[1] == ('2016-01-01T17:00:00', 'Today at noon ET')
assert choices[13] == ('2016-01-02T05:00:00', 'Today at midnight ET')
assert choices[1] == ('2016-01-01T12:00:00', 'Today at noon UTC')
assert choices[13] == ('2016-01-02T00:00:00', 'Today at midnight UTC')
# Saturday
assert choices[14] == ('2016-01-02T06:00:00', 'Tomorrow at 1am ET')
assert choices[37] == ('2016-01-03T05:00:00', 'Tomorrow at midnight ET')
assert choices[14] == ('2016-01-02T01:00:00', 'Tomorrow at 1am UTC')
assert choices[37] == ('2016-01-03T00:00:00', 'Tomorrow at midnight UTC')
# Sunday
assert choices[38] == ('2016-01-03T06:00:00', 'Sunday at 1am ET')
assert choices[38] == ('2016-01-03T01:00:00', 'Sunday at 1am UTC')
# Monday
assert choices[62] == ('2016-01-04T06:00:00', 'Monday at 1am ET')
assert choices[80] == ('2016-01-05T00:00:00', 'Monday at 7pm ET')
assert choices[84] == ('2016-01-05T04:00:00', 'Monday at 11pm ET')
assert choices[85] == ('2016-01-05T05:00:00', 'Monday at midnight ET')
assert choices[62] == ('2016-01-04T01:00:00', 'Monday at 1am UTC')
assert choices[80] == ('2016-01-04T19:00:00', 'Monday at 7pm UTC')
assert choices[84] == ('2016-01-04T23:00:00', 'Monday at 11pm UTC')
assert choices[85] == ('2016-01-05T00:00:00', 'Monday at midnight UTC')
with pytest.raises(IndexError):
assert choices[