Untitled
Anonymous
plain_text
01/17/2025 9:18 AM
492 B
13
Indexable
import datetime
import pytz
if "time" in user_input:
current_time_utc = datetime.datetime.now(pytz.utc)
desired_timezone = pytz.timezone('Asia/Kolkata')
current_time_local = current_time_utc.astimezone(desired_timezone)
formatted_time = current_time_local.strftime("%I:%M:%S %p")
return f"The current time is {formatted_time}."Editor is loading...
Leave a Comment