top of page

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

0 comments

Recent Posts

See All
bottom of page