Skip to content

Instantly share code, notes, and snippets.

@StickmanNinja
Last active September 2, 2018 23:37
Show Gist options
  • Save StickmanNinja/bac7293e103e429d1750577341644ef8 to your computer and use it in GitHub Desktop.
Save StickmanNinja/bac7293e103e429d1750577341644ef8 to your computer and use it in GitHub Desktop.
Generate HTML Dropdown Select List of All Timezones with Python 2.7
import pytz
print "<select name='timezone'>"
for i in pytz.all_timezones:
print "<option value='" + str(i) + "'>" + str(i) + "</option>"
print "</select>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment