DEV Community

AlixaProDev
AlixaProDev

Posted on

How to return the list of Timezone available in Python?

Will this one is easy you just have to use the DateTime package which is available in Python. You have to import the Timezones function from the Datetime Package in Python by using the import statement and after then you have to call the Function just like Below.

from DateTime import Timezones

timezones = set(Timezones())
print(timezones)

for zone in timezones:
    print(zone)
Enter fullscreen mode Exit fullscreen mode

Read out the complete article of how to use the DateTime Python Package.

Discussion (0)