From 07de703491679313133f615a38314eca8f19dff0 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Mon, 8 Jan 2024 08:25:11 -0800 Subject: [PATCH 1/2] notify-admin-1049 --- app/main/forms.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/main/forms.py b/app/main/forms.py index 2520474fc..4036af416 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -1239,11 +1239,15 @@ class ChangePreferredTimezoneForm(StripWhitespaceForm): def __init__(self, *args, **kwargs): super(ChangePreferredTimezoneForm, self).__init__(*args, **kwargs) self.new_preferred_timezone.choices = [ + ("US/Atlantic", "US/Atlantic") ("US/Eastern", "US/Eastern"), ("US/Central", "US/Central"), ("US/Mountain", "US/Mountain"), ("US/Pacific", "US/Pacific"), - ("US/Hawaii", "US/Hawaii"), + ("US/Alaska", "US/Alaska") + ("US/Hawaii-Aleutian", "US/Hawaii-Aleutian"), + ("US/American Samoa", "US/American Samoa"), + ("US/Chamorro", "US/Chamorro") ] new_preferred_timezone = GovukRadiosField( From f43fd3e21f24d70bbf1fecc206bb15fb38472f08 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Mon, 8 Jan 2024 10:13:26 -0800 Subject: [PATCH 2/2] add missing timezones --- app/main/forms.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/main/forms.py b/app/main/forms.py index 4036af416..d9a35b72a 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -1235,19 +1235,20 @@ class ChangeNameForm(StripWhitespaceForm): new_name = GovukTextInputField("Your name") +# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones class ChangePreferredTimezoneForm(StripWhitespaceForm): def __init__(self, *args, **kwargs): super(ChangePreferredTimezoneForm, self).__init__(*args, **kwargs) self.new_preferred_timezone.choices = [ - ("US/Atlantic", "US/Atlantic") + ("America/Puerto_Rico", "America/Puerto_Rico"), ("US/Eastern", "US/Eastern"), ("US/Central", "US/Central"), ("US/Mountain", "US/Mountain"), ("US/Pacific", "US/Pacific"), - ("US/Alaska", "US/Alaska") - ("US/Hawaii-Aleutian", "US/Hawaii-Aleutian"), - ("US/American Samoa", "US/American Samoa"), - ("US/Chamorro", "US/Chamorro") + ("US/Alaska", "US/Alaska"), + ("US/Hawaii", "US/Hawaii"), + ("US/Aleutian", "US/Aleutian"), + ("US/Samoa", "US/Samoa"), ] new_preferred_timezone = GovukRadiosField(