Question

Can anyone tell me how to get the list of "US" timezones only?I know pytz is a module which gives all time zones in the world. Is there is any way which I can get only the list of time zones from 6 US time zones(Central, Pacific, Eastern, Hawaii, Alaska..)?

Was it helpful?

Solution

Timezones commonly in use in United States:

import pytz

tznames = pytz.country_timezones['us']
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top