pytz

有Pytz时区列表吗?

余生长醉 提交于 2020-08-12 02:27:22
问题: I would like to know what are all the possible values for the timezone argument in the Python library pytz. 我想知道Python库pytz中timezone参数的所有可能值是什么。 How to do it? 怎么做? SOLUTION 解 for tz in pytz.all_timezones: print tz Africa/Abidjan Africa/Accra Africa/Addis_Ababa Africa/Algiers Africa/Asmara Africa/Asmera Africa/Bamako Africa/Bangui Africa/Banjul Africa/Bissau Africa/Blantyre Africa/Brazzaville Africa/Bujumbura Africa/Cairo Africa/Casablanca Africa/Ceuta Africa/Conakry Africa/Dakar Africa/Dar_es_Salaam Africa/Djibouti Africa/Douala Africa/El_Aaiun Africa/Freetown Africa/Gaborone Africa/Harare