How to Solve NameError: name 'all_timezones' is not defined -- pytz

Solution: Import the 'all_timezones' module

To Solve the error, add the following line to the top of your code.

from pytz import all_timezones

 

For more information:
Python pytz all_timezones