in Functions.Templates/Templates-v2/OpenAI-Assistant-Python/blueprint_body.py [0:0]
def get_time(timeZone: str) -> str:
from zoneinfo import ZoneInfo
logging.info(f"Getting time for {timeZone}")
# Get the timezone object for the passed
location_timezone = ZoneInfo(timeZone)
# Get the current time for the passed in timezone
current_time = datetime.now(location_timezone)
return json.dumps(current_time.strftime("%H:%M:%S %p"))