Untitled
unknown
plain_text
9 months ago
367 B
4
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