#!/usr/bin/python import pytz from collections import OrderedDict # The following zones are not in pytz.common_timezones and # Etc category in pytz.all_timezones includes some more, # however confusing ones (like UCT, GMT+0, GMT-0,...) ETC_ZONES = ['GMT+1', 'GMT+2', 'GMT+3', 'GMT+4', 'GMT+5', 'GMT+6', 'GMT+7', 'GMT+8', 'GMT+9', 'GMT+10', 'GMT+11', 'GMT+12', 'GMT-1', 'GMT-2', 'GMT-3', 'GMT-4', 'GMT-5', 'GMT-6', 'GMT-7', 'GMT-8', 'GMT-9', 'GMT-10', 'GMT-11', 'GMT-12', 'GMT-13', 'GMT-14', 'UTC', 'GMT'] if __name__ == "__main__": result = OrderedDict() for tz in pytz.common_timezones: parts = tz.split("/", 1) if len(parts) > 1: print tz for tz in ETC_ZONES: print "Etc/" + tz