Skip to content

Commit

Permalink
Update output formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
InsertDisc authored Feb 17, 2024
1 parent ecce505 commit 56b7a6e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,31 +801,31 @@ def setting(value):
try:
print(f"Attempting to get local timezone from host environment")
if is_docker == "True":
print("Docker environment detected =>")
print("=> Docker environment detected")
try:
timezone = os.environ.get('TZ')
if timezone is None:
print("Could not retrieve timezone information from docker 'TZ' environment variable.")
print("Attempting 'Docker Host'")
print(" Could not retrieve timezone information from docker 'TZ' environment variable.")
print(" => Attempting 'Docker Host'")
try:
print("Docker Host Detected:", get_os())
print(" Docker Host Detected:", get_os())
system_tz = tzlocal.get_localzone()
timezone = str(system_tz)
print(f"Using locality {timezone} to adjust for airing dates.")
print(f" Using locality {timezone} to adjust for airing dates.")
except Exception as e:
print("Could not retrieve timezone information from 'Docker Host'.")
print(f"An error occured: {e}")
print("Falling back to default")
print(" Could not retrieve timezone information from 'Docker Host'.")
print(f" An error occured: {e}")
print(" Falling back to default")
timezone = "America/New_York"
print(f"Using locality {timezone} to adjust for airing dates.")
print(f" Using locality {timezone} to adjust for airing dates.")
except Exception as e:
print(f"An error occured: {e}")
print(f"Details:")
print(f"Environment detected")
print(f" => Docker")
print(f"Failed to retrieve timezone from:")
print(f" => Docker 'TZ' environment variable")
print(f" => Docker Host OS")
print(f" => Docker Host OS:", get_os())
print("--Falling back to default--")
timezone = "America/New_York"
print(f"Using locality {timezone} to adjust for airing dates.")
Expand Down

0 comments on commit 56b7a6e

Please sign in to comment.