[FIXED] Gibt es eine Liste der Pytz-Zeitzonen?

Ausgabe

Ich würde gerne wissen, was alle möglichen Werte für das Zeitzonenargument in der Python-Bibliothek pytz sind. Wie es geht?

Lösung

Sie können alle verfügbaren Zeitzonen auflisten mit pytz.all_timezones:

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

Es gibt auch pytz.common_timezones:

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

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


Beantwortet von –
unutbu


Antwort geprüft von –
Senaida (FixError Volunteer)

0 Shares:
Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like