Is there a list of Pytz Timezones?

Submitted 4 years, 6 months ago
Ticket #243
Views 348
Language/Framework Python
Priority Low
Status Closed

I  would like to know what are all the possible values for the timezone argument in the Python library pytz. How to do it?

Submitted on Oct 19, 20
add a comment

1 Answer

Verified

For all the available timezones you can use :: pytz.all_timezones:

In [40]: import pytz
In [41]: pytz.all_timezones
Out[42]: 
['Africa/Abidjan',
 'Africa/Accra',
 'Africa/Addis_Ababa',
 ...]

For common time zones :::: you can use pytz.common_timezones:

In [45]: len(pytz.common_timezones)
Out[45]: 403

In [46]: len(pytz.all_timezones)
Out[46]: 563

Submitted 4 years, 6 months ago


Latest Blogs