Domanda

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..)?

È stato utile?

Soluzione

Timezones commonly in use in United States:

import pytz

tznames = pytz.country_timezones['us']
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top