First_agent_template / tools /get_current_time_in_timezone.py
alexander1198's picture
Create get_current_time_in_timezone.py
caa947c verified
raw
history blame contribute delete
184 Bytes
from datetime import datetime
import pytz
def get_current_time_in_timezone(timezone: str) -> str:
tz = pytz.timezone(timezone)
return datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S %Z")