Default timezone to UTC (very useful for servers)

Update user_interaction.py
This commit is contained in:
Dylan M. Taylor 2021-04-12 10:47:36 -04:00 committed by Dylan Taylor
parent e4b2742192
commit 60ee752a12
1 changed files with 3 additions and 1 deletions

View File

@ -130,7 +130,9 @@ def ask_for_additional_users(prompt='Any additional users to install (leave blan
return users, super_users
def ask_for_a_timezone():
timezone = input('Enter a valid timezone (Example: Europe/Stockholm): ').strip()
timezone = input('Enter a valid timezone (examples: Europe/Stockholm, US/Eastern) or press enter to use UTC: ').strip()
if timezone == '':
timezone = 'UTC'
if (pathlib.Path("/usr")/"share"/"zoneinfo"/timezone).exists():
return timezone
else: