Вопрос

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

Это было полезно?

Решение

Timezones commonly in use in United States:

import pytz

tznames = pytz.country_timezones['us']
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top