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
Comments