Relative Content

Tag Archive for pythondatetimezoneinfo

How to get the time zone from datetime with zoneinfo libraries in Python?

I have a code where I get date and time of different parts of the world with the datetime and zoneinfo libraries in Python. I am able to extract the dates and hourse separately in day, month, year, hour, minute, second and microsecond, but I don’t know hoe to extract the Time Zone part of the datetime variable I got. Part of the code is as follows: