Python PytZ Module Script to Get the Current Time of any Timezone in World Full Project For Beginners

You are currently viewing Python PytZ Module Script to Get the Current Time of any Timezone in World Full Project For Beginners

 

Welcome folks today in this blog post we will be getting the current time of timezone in python using the pytz module. All the full source code of the application is shown below.

 

 

Get Started

 

 

In order to get started you need to install the following library using the pip command as shown below

 

pip install pytz

 

After installing this library you need to make an app.py file and copy paste the following code

 

app.py

 

 

 

Now if you execute the above python script by typing the below command as shown below

 

python app.py

 

 

Now you can see that we have retrieved the current time of new york and london timezone

Leave a Reply