The Tech Platform

May 9, 20211 min

Write the Program to get the Current Time in Python

There are Multiple of ways through which you can get the current time and this is one of simplest way.

from datetime import *
 
import pytz
 

 
tz_INDIA = pytz.timezone('Asia/Kolkata')
 
datetime_INDIA = datetime.now(tz_INDIA)
 
print("Right Now Time in INDIA is:", datetime_INDIA.strftime("%H:%M:%S"))

Output:

Source: programmiz

The Tech Platform

www.thetechplatform.com

    0