Issue
I would like to know what are all the possible values for the timezone argument in the Python library pytz. How to do it?
Solution
You can list all the available timezones with pytz.all_timezones
:
In [40]: import pytz
In [41]: pytz.all_timezones
Out[42]:
['Africa/Abidjan',
'Africa/Accra',
'Africa/Addis_Ababa',
...]
There is also pytz.common_timezones
:
In [45]: len(pytz.common_timezones)
Out[45]: 403
In [46]: len(pytz.all_timezones)
Out[46]: 563
Answered By - unutbu
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.