Previously there was a string interpolation sign (%s) but nothing was being added. This change adds tzenv to give a better error message.
Before
>>> import tzlocal
>>> tzlocal.utils._tz_from_env("US/Chicago")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/caleb/Downloads/tzlocal/tzlocal/utils.py", line 125, in _tz_from_env
raise ZoneInfoNotFoundError(
tzlocal.utils.ZoneInfoNotFoundError: 'tzlocal() does not support non-zoneinfo timezones like %s. \nPlease use a timezone in the form of Continent/City'
After
>>> import tzlocal
>>> tzlocal.utils._tz_from_env("US/Chicago")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/caleb/Downloads/tzlocal/tzlocal/utils.py", line 125, in _tz_from_env
raise ZoneInfoNotFoundError(
tzlocal.utils.ZoneInfoNotFoundError: 'tzlocal() does not support non-zoneinfo timezones like US/Chicago. \nPlease use a timezone in the form of Continent/City'
Previously there was a string interpolation sign (%s) but nothing was being added. This change adds tzenv to give a better error message.
Before
After